メソッド分割

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6678 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-06-13 12:48:22 +00:00
parent 496757fd9c
commit 8d9d3bcb02

View File

@ -778,17 +778,7 @@ catch(e) {
if (!draggedTab) {
aEvent.stopPropagation();
let url;
let types = ['text/x-moz-url', 'text/uri-list', 'text/plain', 'application/x-moz-file'];
for (let i = 0; i < types.length; i++) {
let dataType = types[i];
let isURLList = dataType == 'text/uri-list';
let urlData = dt.mozGetDataAt(isURLList ? 'URL' : dataType , 0);
if (urlData) {
url = this.retrieveURLFromData(urlData, isURLList ? 'text/plain' : dataType);
break;
}
}
let url = this.retrieveURLFromDataTransfer(dt);
if (!url || !url.length || url.indexOf(' ', 0) != -1 || /^\s*(javascript|data):/.test(url))
return;
@ -842,7 +832,22 @@ catch(e) {
}
}
},
retrieveURLFromData: function TSTService_retrieveURLFromData(aData, aType)
retrieveURLFromDataTransfer : function TSTService_retrieveURLFromDataTransfer(aDataTransfer)
{
let url;
let types = ['text/x-moz-url', 'text/uri-list', 'text/plain', 'application/x-moz-file'];
for (let i = 0; i < types.length; i++) {
let dataType = types[i];
let isURLList = dataType == 'text/uri-list';
let urlData = aDataTransfer.mozGetDataAt(isURLList ? 'URL' : dataType , 0);
if (urlData) {
url = this.retrieveURLFromData(urlData, isURLList ? 'text/plain' : dataType);
break;
}
}
return url;
},
retrieveURLFromData : function TSTService_retrieveURLFromData(aData, aType)
{
switch (aType)
{