User:Jinbobo/Sandbox

mw.user.isAnon - Check if user is logged in.

Scrape image URLs from navboxes
Array.prototype.getUnique = function{ var u = {}, a = []; for(var i = 0, l = this.length; i < l; ++i){ if(u.hasOwnProperty(this[i])) { continue; }     a.push(this[i]); u[this[i]] = 1; }  return a; } arr = $(".navbox").html.match(/\/images\/thumb\/.\/..\/Grid[^\.]+\.png/g); for(i=0; igetUrl;

Issue trackers

 * https://bitbucket.org/jinbobo/tilesheets-wiki-extension/issues
 * https://bitbucket.org/jinbobo/ore-dict-wiki-extension/issues
 * https://bitbucket.org/jinbobo/ftb-wiki-mobile-skin/issues
 * https://bitbucket.org/jinbobo/ftb-wiki-skin/issues

Image path scraper
Array.prototype.getUnique = function{ var u = {}, a = []; for(var i = 0, l = this.length; i < l; ++i){ if(u.hasOwnProperty(this[i])) { continue; }     a.push(this[i]); u[this[i]] = 1; }  return a; } arr = $(".navbox").html.match(/\/[0-9a-e]\/[0-9a-e]{2}\/Grid[^\. ]+.png/g); for(i=0; i<arr.length; i++){ arr[i] = arr[i].replace("%28","(").replace("%29",")"); } arr = arr.getUnique; for(i=0; i<arr.length; i++){ $("#mw-content-text").append("http://wiki.feed-the-beast.com/images").append(arr[i].replace("%28","(").replace("%29",")")+" "); }