1,904
עריכות
אין תקציר עריכה |
אין תקציר עריכה |
||
שורה 5: | שורה 5: | ||
wgPatrolDistressRestSeconds = 60; | wgPatrolDistressRestSeconds = 60; | ||
mw.loader.load("https://meta.wikimedia.org/wiki?title=User:Perhelion/WikiEditorEmoticons.js&action=raw&ctype=text/javascript"); | mw.loader.load("https://meta.wikimedia.org/wiki?title=User:Perhelion/WikiEditorEmoticons.js&action=raw&ctype=text/javascript"); | ||
( function () { | |||
'use strict'; | |||
var stubparts, bookmarklets, bookmarkletsWrong, | |||
$bookmarkletsList = $( '#bookmarkletsList' ); | |||
stubparts = [ | |||
"javascript:(function(){if(typeof(", | |||
")=='undefined'){var s=document.createElement('script');s.setAttribute('src','http://chabadpedia.co.il/index.php?title= ", | |||
"&action=raw&maxage=3600&ctype=text/javascript&dontcountme=s');document.getElementsByTagName('head')[0].appendChild(s);}else ", | |||
"();})()" | |||
]; | |||
bookmarklets = [ | |||
{ | |||
func: 'wikiit', | |||
sourcepage: 'MediaWiki:Common.js/externalsmaker.js', | |||
name: 'תבנית לחב"דפדיה', | |||
description: ' ' | |||
} | |||
]; | |||
bookmarkletsWrong = function ( e ) { | |||
e.preventDefault(); | |||
alert( 'את הקישור יש לגרור לסרגל המועדפים, ולהפעיל באתרים המתאימים.' + | |||
'\nקישור זה לא מיועד להפעלה מתוך חב"דפדיה. למידע נוסף קראו את ההוראות בדף.' | |||
); | |||
}; | |||
$bookmarkletsList.empty(); | |||
$( bookmarklets ).each( function( i, bookmarklet ) { | |||
var $link, $item; | |||
$link = $( '<a>' ) | |||
.prop( 'href', stubparts[0] + bookmarklet.func + | |||
stubparts[1] + bookmarklet.sourcepage + | |||
stubparts[2] + bookmarklet.func + | |||
stubparts[3] ) | |||
.click( bookmarkletsWrong ) | |||
.text( bookmarklet.name ); | |||
$item = $( '<li>' ) | |||
.text( bookmarklet.description ) | |||
.append( $link ); | |||
$bookmarkletsList.append( $item ); | |||
} ); | |||
} )(); |