-
-
Save sys1yagi/4044841 to your computer and use it in GitHub Desktop.
expand all tree on google site's sitemap. auto!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var t = 1000;var r = 3;var s = function(k){return document.getElementsByClassName('goog-tree-expand-icon-'+k);};var d = function(p){var e=document.createEvent('MouseEvents');e.initMouseEvent('mousedown',true,true,window,0,0,0,0,0,false,false,false,false,0,null);while(p.length>0){p[0].dispatchEvent(e);}};var c = function(){var p=s("tplus");var ps = p.length;d(p);var l=s("lplus");var ls = l.length;d(l);if(r>0){if(ps + ls == 0){console.log("retry");r--;}setTimeout(function(){c();}, t);}};c();})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var t = 1000; | |
var r = 3; | |
var s = function(k){ | |
return document.getElementsByClassName('goog-tree-expand-icon-'+k); | |
}; | |
var d = function(p){ | |
var e=document.createEvent('MouseEvents'); | |
e.initMouseEvent('mousedown',true,true,window,0,0,0,0,0,false,false,false,false,0,null); | |
while(p.length>0){ | |
p[0].dispatchEvent(e); | |
} | |
}; | |
var c = function(){ | |
var p=s("tplus"); | |
var ps = p.length; | |
d(p); | |
var l=s("lplus"); | |
var ls = l.length; | |
d(l); | |
if(r>0){ | |
if(ps + ls == 0){ | |
console.log("retry"); | |
r--; | |
} | |
setTimeout(function(){ | |
c(); | |
}, t); | |
} | |
}; | |
c(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
わーい、やったー!