User:Gryllida/js/IPs.js
Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac); IE: hold Ctrl while clicking Refresh, or press Ctrl-F5; Konqueror: simply click the Reload button, or press F5; Opera users may need to completely clear their cache in Tools→Preferences. — More skins
//alert('hello');
GryllidaIPs = {};
GryllidaIPs.doStuff = function () {
//alert('hi');
$.each($('.mw-parser-output a'), function ( index, $value ) {
// console.log( index + ": " + $value );
//console.log($value.title);
t = $value.title;
if(t.indexOf('Special:Contributions') === 0){
ip = t.substring(22);
// ...
}
});
};
$(document).ready( function() {
"use strict";
mw.loader.using( [ 'mediawiki.api'], GryllidaIPs.doStuff );
} );