משתמש:IKhitron/common.js – הבדלי גרסאות
מראה
תוכן שנמחק תוכן שנוסף
אין תקציר עריכה |
אין תקציר עריכה |
||
שורה 69: | שורה 69: | ||
} |
} |
||
} |
} |
||
mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:Samwilson/TemplateWizard.js&action=raw&ctype=text/javascript' ); |
גרסה מ־13:34, 29 במרץ 2018
mw.loader.using( 'mediawiki.util' ).done(function(){
function importMyScript() {
'use strict';
var args = arguments;
mw.loader.using('mediawiki.util', function() {
for (var arg = 0; arg < args.length; arg++) {
try {
importScript( "User:IKhitron/" + args[arg] + ".js" );
}
catch(e) {}
}
});
}
// removed: 16, 22, 75; 9, 61
// moved to global: 88
importUserScript(65, 76, 52);
importUserScript(46, 67, 81, 101);
// myscripts
importMyScript(95);
mw.util.addPortletLink('p-personal', mw.util.getUrl() + "?action=purge", 'מטמון', 'pt-refresh-cache', '', '', '#pt-mytalk');
//mw.loader.load("https://fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget" +
// "-FlowDeluxe.js&action=raw&ctype=text/javascript");
//mw.loader.load('ext.gadget.FlowDeluxeLocal');
if (typeof window.orientation == 'undefined') {
// desktop
mw.loader.load('ext.gadget.RestoreWarnings');
importUserScript(33, 89);
importUserScript(71, 40, 44);
importUserScript(78, 80);
if ( mw.config.get( 'wgNamespaceNumber' ) == 14 && mw.config.get( 'wgPageName' ) == 'קטגוריה:קטגוריות_לריקון_מיידי') {
$( '.CategoryTreeEmptyBullet' ).closest( 'li' ).remove(); // remove empty cats
$( '.mw-category-group:not(:has(li))' ).remove(); // remove emptied sections
}
$( mw.util.addPortletLink( 'p-cactions', '#', 'מיספור רשימות' ) )
.click( function() {
$( '.mw-body-content ul' ).each( function() {
$( this ).children( 'li' ).wrapAll( '<ol> ');
} ); // each
} ); //click
}
importScript('User:1Or/misdar.js');
});
var hash = navigator.userAgent.indexOf( 'Firefox' ) === -1 ? location.hash :
decodeURIComponent( location.hash );
if ( hash.indexOf( ' ' ) !== -1 ) {
var restoredFragment = hash.substring( 1 ).replace( / /g, '_' );
var targetElement = document.getElementById( restoredFragment );
if ( targetElement ) {
if ( typeof targetElement.scrollIntoView !== 'undefined' ) {
targetElement.scrollIntoView();
console.log(typeof history);
if ( typeof history !== 'undefined' ) {
history.replaceState( {}, '', '#' + restoredFragment );
}
} else {
location.hash = '#' + restoredFragment;
}
}
}
mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:Samwilson/TemplateWizard.js&action=raw&ctype=text/javascript' );