Jump to content

User:OwenBlacker/common.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
function AddLanguageTooltips()
{
   /* $('span[lang]').tipsy({title: function() { return "Language: " + jsL10N.iso639(this.getAttribute('lang'), 'en'); } }); */
   /* $('span[lang]').each( function() { $(this).tooltip( { content: "Language: " + $(this).attr('lang') } ) } ); */
   /* $('span[lang]').setAttr('title', "Language: " + $(this).attr('lang')); */

   $('span[lang]').each( function(index, element) {
      var span = $(this);
      span.attr('title', "Language: " + span.attr('lang') );
      console.log("Added a language tooltip " + index + " for [" + span.text() + "] in language " + span.attr("lang"));
   });
   console.log("AddLanguageTooltips loaded.");
}

function AddSignpostToggle()
{
   if($("#SignpostToggle").length !== 0)
   {
      $("#SignpostToggle td").append("<a>Show/hide <em>Signpost</em></a>");
      $("#SignpostToggle td a").click(function() { $(".signpost").toggle(); });
      $("#SignpostToggle").show();
      console.log("AddSignpostToggle loaded.");
   }
   else
   { console.log("AddSignpostToggle: No #SignpostToggle element found."); }
}

$(AddLanguageTooltips);
$(AddSignpostToggle);

console.log("Performing script and style imports...");
importScript('User:Cameltrader/Advisor.js'); /* [[User:Cameltrader/Advisor.js/Description]] */
importScript('Wikipedia:WikiProject User scripts/Scripts/Changes since I last edited');
importScript('Wikipedia:WikiProject User scripts/Scripts/HistoryCount');
importScript('User:Ais523/topcontrib.js');
importScript('User:TachyonJack/gTranslate.js');
importScript("User:GregU/dashes.js");
importScript('User:Lampak/MyLanguages.js'); var mylangsArray = ["fr", "de", "es", "cy"]; /* [[User:Lampak/MyLanguages]] */
importScript('User:OwenBlacker/Scripts/VoteSymbols.js');
importScript('User:Gary King/highlight my username in history.js');
importScript('User:Ucucha/duplinks.js'); /* [[User:Ucucha/duplinks]] */
importScript('User:Ais523/bracketmatch.js');
importScript('User:Shubinator/DYKcheck.js'); dateFormat = "british"; /* [[User:Shubinator/DYKcheck]] */
importScript('User:Dr_pda/prosesize.js'); /* [[User:Dr pda/prosesize]] */
importScript('User:Evad37/rater.js'); // [[User:Evad37/rater]]

importStylesheet('User:Edokter/VectorButtons.css'); /* [[User:Edokter/VectorButtons.css]] */
console.log("Done with script and style imports.");
importScript('User:Headbomb/unreliable.js'); // Backlink: [[User:Headbomb/unreliable.js]]
importScript('User:Enterprisey/user-tabs-on-contribs.js'); // Backlink: [[User:Enterprisey/user-tabs-on-contribs.js]]
importScript('User:Mr. Stradivarius/gadgets/SignpostTagger.js'); // Linkback: [[User:Mr. Stradivarius/gadgets/SignpostTagger.js]]
importScript('User:EpochFail/ArticleQuality-loader.js'); // Backlink: [[User:EpochFail/ArticleQuality-loader.js]]
importScript('User:Enterprisey/delsort.js'); // Backlink: [[User:Enterprisey/delsort.js]]
importScript('User:Nardog/RefRenamer.js'); // Backlink: [[User:Nardog/RefRenamer.js]]