User:Luístro/ScriptLibrary.js: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
$('#p-interaction').clone(true).insertAfter($('#p-interaction')).addClass('mylinks').removeAttr('id').find('h3').text('Script Library'); |
$('#p-interaction').clone(true).insertAfter($('#p-interaction')).addClass('mylinks').removeAttr('id').find('h3').text('Script Library'); |
||
$('.mylinks li').remove(); |
$('.mylinks li').remove(); |
||
$('.mylinks .body ul').append('<li><a href="https://en.wikipedia.org/wiki/Wikipedia:User_scripts/List" class="myLinks1">Script List</a></li>') |
$('.mylinks .body ul').append('<li><a href="https://en.wikipedia.org/wiki/Wikipedia:User_scripts/List" class="myLinks1">Script List</a></li>') |
||
if (wgPageName.lastIndexOf('.js') == wgPageName.length - 3 && (window.location.href.slice(window.location.href.length-9) != "common.js")) { |
//if (wgPageName.lastIndexOf('.js') == wgPageName.length - 3 && (window.location.href.slice(window.location.href.length-9) != "common.js")) { |
||
// var doc = window.location.href.slice(0, window.location.href.length-3); |
|||
$('.mylinks .body ul').append('<li><a class="myLinks2">Documentation</a></li>'); |
//$('.mylinks .body ul').append('<li><a class="myLinks2">Documentation</a></li>'); |
||
$('.mylinks .body ul .myLinks2').attr("href", doc); |
//$('.mylinks .body ul .myLinks2').attr("href", doc); |
||
} |
} |
Latest revision as of 18:55, 24 July 2019
importScript('User:Equazcion/ScriptInstaller.js');//install and uninstall module
$('#p-interaction').clone(true).insertAfter($('#p-interaction')).addClass('mylinks').removeAttr('id').find('h3').text('Script Library');
$('.mylinks li').remove();
$('.mylinks .body ul').append('<li><a href="https://en.wikipedia.org/wiki/Wikipedia:User_scripts/List" class="myLinks1">Script List</a></li>')
//if (wgPageName.lastIndexOf('.js') == wgPageName.length - 3 && (window.location.href.slice(window.location.href.length-9) != "common.js")) {
// var doc = window.location.href.slice(0, window.location.href.length-3);
//$('.mylinks .body ul').append('<li><a class="myLinks2">Documentation</a></li>');
//$('.mylinks .body ul .myLinks2').attr("href", doc);
}