מדיה ויקי:Gadget-patrolAlarm.js: הבדלים בין גרסאות בדף
אופסי - ערכי ברירת מחדל פרטיים לא צריך לערבב עם כולם. |
resurrect the ability to turn message off. this is useful if you have multiple tabs - we want to turn it off in all tabs |
||
| שורה 87: | שורה 87: | ||
} | } | ||
function distressMessage() { | function distressMessage(distress) { | ||
var li = document.getElementById("n-recentchanges"); | var li = document.getElementById("n-recentchanges"); | ||
if (!li) | if (!li) | ||
return; | return; | ||
$.extend(li.style, {backgroundColor:'yellow',cursor:'pointer'}); | if (distress) { | ||
$.extend(li.style, {backgroundColor:'yellow',cursor:'pointer'}); | |||
li.title = "מצוקת ניטור חמורה.\n.כל המצילים מתבקשים לחוף גורדון"; | |||
li.onclick = function(){window.location='http://he.wikipedia.org/w/index.php?title=מיוחד:שינויים_אחרונים&hidepatrolled=1';} | |||
} else { | |||
li.style.background = li.style.cursor = li.title = ''; | |||
delete li.onclick; | |||
} | |||
} | } | ||
| שורה 107: | שורה 112: | ||
function setDistress(distress) { | function setDistress(distress) { | ||
setCookieVal("inDistress", distress ? "1" : "0"); | setCookieVal("inDistress", distress ? "1" : "0"); | ||
distressMessage(distress); | |||
} | } | ||