Revision as of 09:07, 1 October 2011 view sourceAmalthea (talk | contribs)31,926 edits per talk page request, import MediaWiki:Gadget-navpop.css directly← Previous edit |
Latest revision as of 14:34, 9 February 2021 view source Xaosflux (talk | contribs)Edit filter managers, Autopatrolled, Bureaucrats, Importers, Interface administrators, Oversighters, Administrators83,870 edits expand directions |
(4 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
|
var popScript = 'http://en.wikipedia.org/search/?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-popups.js'; |
|
var popScript = '//en.wikipedia.org/search/?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-popups.js'; |
|
var popStyleSheet = 'http://en.wikipedia.org/search/?action=raw&ctype=text/css&title=MediaWiki:Gadget-navpop.css'; |
|
var popStyleSheet = '//en.wikipedia.org/search/?action=raw&ctype=text/css&title=MediaWiki:Gadget-navpop.css'; |
|
if ( window.localCSS ) { popStyleSheet = 'http://localhost:8080/js/navpop.css'; } |
|
if ( window.localCSS ) { popStyleSheet = 'http://localhost:8080/js/navpop.css'; } |
|
|
|
|
Line 27: |
Line 27: |
|
popups_importStylesheetURI(popStyleSheet); |
|
popups_importStylesheetURI(popStyleSheet); |
|
popups_importScriptURI(popScript); |
|
popups_importScriptURI(popScript); |
|
|
|
|
|
if ( typeof mw !== 'undefined' ) { |
|
|
mw.loader.using( , function() { |
|
|
var k = 'User:Lupin/popups.js', |
|
|
t = 'Information: You are importing User:Lupin/popups.js' + |
|
|
' into your User:USERNAME/common.js or User:USERNAME/<skin>.js!\n' + |
|
|
'This script is unmaintained. Please remove this inclusion and enable the Navigation popups Gadget in the preferences of your account instead.', |
|
|
x = mw.storage.get( k ); |
|
|
|
|
|
if ( !x ) { |
|
|
mw.storage.set( k, 1 ); |
|
|
alert( t ); |
|
|
} else { |
|
|
x++; |
|
|
mw.storage.set( k, x ); |
|
|
if ( x % 25 === 0 ) { |
|
|
mw.notify( t ); |
|
|
} |
|
|
} |
|
|
}); |
|
|
} |