User talk:Darqam/vector.js
From Guild Wars 2 Wiki
Jump to navigationJump to search
So what was broken and would you like help? -Chieftain Alex
18:06, 6 October 2016 (UTC)
- I was trying to add a link to User:Darqam/Dat Icons to my bar on the left, right below random page. According to some documentation
mw.util.addPortletLink ( 'p-navigation', '/wiki/User:Darqam/Dat_Icons', 'Dat Icons', 'n-Dat-icons', 'Dat Icons' );
- should have worked, but it did absolutely nothing. So I'm not sure exactly why, but iz broke. -Darqam (talk) 18:16, 6 October 2016 (UTC)
/*** ATools **** Vector alternative to GW2WT.*/
importScript("User:Chieftain Alex/ATools.js");
/** Job queue - Query wiki API with ajax for the job queue statistic, copied from User:Dr ishmael/monobook.js **/
(function addJobQueuetoSpecialStatistics () {
if (mw.config.get('wgCanonicalSpecialPageName') === 'Statistics') {
$.getJSON('/api.php?action=query&format=json&meta=siteinfo&siprop=statistics').done(function (data){
var jobqueue = data['query']['statistics']['jobs'] || 0;
$('Job queue'+jobqueue+'').insertAfter('.mw-statistics-edits-average');
})
}
})();
/** random additions to page (this may scar 'real' coders for life, so beware). **/
(function addSidebarAdditionalLinks(document) {
$('.editButtons').append(' | ← – ²{ « ¦ ¶ » }² — →');
$('.mw-htmlform-field-Licenses').append('<textarea>== Licensing ==\n{{ArenaNet image|icon|Effect icons}}</textarea>');
mw.util.addPortletLink ( 'p-navigation', '/wiki/User:Darqam/Dat_Icons', 'Dat Icons', 'n-Dat-icons', 'Dat Icons' );
mw.util.addPortletLink ( 'p-navigation', '/wiki/Event_timers', 'Event timers', 'n-Event-timers', 'Event timers' );
mw.util.addPortletLink ( 'p-personal', mw.util.getUrl( 'Special:MyPage/Notes' ) + '?action=edit',
'My notes', 'pt-mynotes', 'Edit your personal notes' );
/** Reformats stub tag **/
var tmp_title=$("#stub").attr("title");
if (tmp_title == null){
tmp_title = "Some scrub didn't put a reason, go fix that too."
}
var new_content="Yo Darqam; fix this STUB: "+tmp_title+"";
$("#stub").html(new_content);
/** Reformats section-stub tag **/
var tmp_title=$("#section-stub").attr("title");
if (tmp_title == null){
tmp_title = "Some scrub didn't put a reason, go fix that too."
}
var new_content="Yo Darqam; fix this SECTION-STUB: "+tmp_title+"";
$("#section-stub").html(new_content);
}
})(document);
- Great! That probably occurred due to having more closing brackets - see yellow bit - than opening brackets, so it threw an error instead of parsing the block of code. -Chieftain Alex
22:00, 6 October 2016 (UTC)
- Great! That probably occurred due to having more closing brackets - see yellow bit - than opening brackets, so it threw an error instead of parsing the block of code. -Chieftain Alex