From StrategyWiki, the video game walkthrough and strategy guide wiki
Jump to navigation Jump to search
m (fixing link)
(test worked)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
// SKIZZERZ COMMON LIBRARY FUNCTIONS
//
//  Author: User:Ryan Schmidt
//  License: Unstated (CC-BY-SA)
//  Description: Add some common scripts, usable in other scripts.
importScript('User:Ryan Schmidt/Scripts/library.js');
// FIND AND REPLACE (modified)
// FIND AND REPLACE (modified)
//
//
Line 13: Line 5:
//  Desc: Adds a dropdown utility under the edit toolbar for search and replace terms.
//  Desc: Adds a dropdown utility under the edit toolbar for search and replace terms.


importScript('User:Ryan Schmidt/Scripts/SearchBox.js');
importScript('User:Najzere/zockys SearchBox.js');


// AJAX PATROL V1.1 (modified)
// AJAX PATROL V1.1 (modified)
Line 40: Line 32:


importScript('User:Najzere/formatachievements.js');
importScript('User:Najzere/formatachievements.js');
// LIST SORTER
//
//  Author: Brian Huisman @ http://my.opera.com/GreyWyvern/blog/show.dml/1671288
//  License: ?? seems to be open
//  Description: Alphanumeric sorting of highlighted, multi-line text lists.
//                Each list item goes on a separate line with no blank lines in between.
//                Then highlight the list and click for ascending or descending sort.
importScript('User:Najzere/listsort.js');


// EDIT COUNTER
// EDIT COUNTER
Line 60: Line 42:
var tableClass = 'collapsible collapsed';  // Class for the table
var tableClass = 'collapsible collapsed';  // Class for the table
var tableStyle = 'width:100%';            // Styles for the table
var tableStyle = 'width:100%';            // Styles for the table
importScriptURI('http://strategywiki.org/w/index.php?title=User:Najzere/edit_counter.js&action=raw&ctype=text/javascript');
mw.loader.load('http://strategywiki.org/w/index.php?title=User:Najzere/edit_counter.js&action=raw&ctype=text/javascript');
 
// test
importScript('User:Najzere/spoilerimage.js');


// CUSTOM STUFF ON PAGE LOAD
// CUSTOM STUFF ON PAGE LOAD
Line 66: Line 51:
//  Author: User:Najzere
//  Author: User:Najzere
//  License: Public Domain
//  License: Public Domain
//  Description: Various little things to help with repeated actions
//  Description: Add some links


addOnloadHook( function() {
// Add stuff on page load
   // Add a button linking to the cleanup project daily tasks at the top of the page
$(document).ready(function() {
   addPortletLink('p-personal', '/wiki/User:Najzere/Cleanup', 'Cleanup', 'p-cleanup', 'Personal cleanup stuff', '9', document.getElementById('pt-preferences'));
   // Add link directly to sub-pages of the current page
   // Add links to main page and upload page in navlist
   mw.util.addPortletLink('p-tb','/w/index.php?title=Special:PrefixIndex&prefix='+mw.config.get('wgTitle')+'/'+'&namespace='+mw.config.get('wgNamespaceNumber'),'Sub-pages','t-subpages','View sub-pages',false,'#t-recentchangeslinked');
  var mainpage = document.createElement('a');
   mw.util.addPortletLink('p-personal','/wiki/User:Najzere/Cleanup','Cleanup','p-cleanup','Personal cleanup stuff',false,'#pt-preferences');
  var upload = document.createElement('a');
  mainpage.href = '/wiki/Main Page';
  mainpage.innerHTML = 'Main Page';
  upload.href = '/wiki/Special:Upload';
  upload.innerHTML = 'Upload';
  var list1 = document.createElement('li');
  var list2 = document.createElement('li');
  list1.appendChild(mainpage);
  list2.appendChild(upload);
  document.getElementById('navlist').insertBefore(list2, document.getElementById('navlist').childNodes[0]);
  document.getElementById('navlist').insertBefore(list1, document.getElementById('navlist').childNodes[0]);
});
});

Latest revision as of 14:22, 11 April 2013

// FIND AND REPLACE (modified)
//
//   Author: User:Zocky @ en.wikipedia.org
//   License: (c) 2006, released under GPL
//   Desc: Adds a dropdown utility under the edit toolbar for search and replace terms.

importScript('User:Najzere/zockys SearchBox.js');

// AJAX PATROL V1.1 (modified)
//
//   Author: User:Ryan Schmidt
//   License: Unstated (CC-BY-SA)
//   Description: Moves to next diff when you patrol and edit, or removes link if you're on the last one.

var AjaxPatrolAutoNext = true; // set to "true" to turn on, or "false" to turn off
importScript('User:Najzere/ajaxpatrol.js');

// URL SOURCE ON UPLOAD
//
//   Author: User:Najzere
//   License: CC-BY-SA 3.0 - http://creativecommons.org/licenses/by-sa/3.0/
//   Description: Adds image source to upload summary when uploading from URL

importScript('User:Najzere/adduploadurl.js');

// ACHIEVEMENTS QUICK-FORMATTING
//
//   Author: User:Najzere
//   License: CC-BY-SA 3.0 - http://creativecommons.org/licenses/by-sa/3.0/
//   Description: Adds a button to the edit toolbar that attempts to format
//                copy/paste from xbox360achievements.com into SW achievements table.

importScript('User:Najzere/formatachievements.js');

// EDIT COUNTER
//
//   Author: User:Najzere
//   License: CC-BY-SA 3.0 - http://creativecommons.org/licenses/by-sa/3.0/
//   Description: Adds a button to the toolbox that generates a table of your edit counts by namespace.

var editPage = 'Edit count';               // Page in userspace where table is written to
var tableClass = 'collapsible collapsed';  // Class for the table
var tableStyle = 'width:100%';             // Styles for the table
mw.loader.load('http://strategywiki.org/w/index.php?title=User:Najzere/edit_counter.js&action=raw&ctype=text/javascript');

// test
importScript('User:Najzere/spoilerimage.js');

// CUSTOM STUFF ON PAGE LOAD
//
//   Author: User:Najzere
//   License: Public Domain
//   Description: Add some links

// Add stuff on page load
$(document).ready(function() {
  // Add link directly to sub-pages of the current page
  mw.util.addPortletLink('p-tb','/w/index.php?title=Special:PrefixIndex&prefix='+mw.config.get('wgTitle')+'/'+'&namespace='+mw.config.get('wgNamespaceNumber'),'Sub-pages','t-subpages','View sub-pages',false,'#t-recentchangeslinked');
  mw.util.addPortletLink('p-personal','/wiki/User:Najzere/Cleanup','Cleanup','p-cleanup','Personal cleanup stuff',false,'#pt-preferences');
});