מדיה ויקי:Gadget-Watchlist.js: הבדלים בין גרסאות בדף
עכשיו עובד גם ב"משופרת" |
"הפסק לעקוב" במקום "הסר" |
||
| שורה 11: | שורה 11: | ||
return; | return; | ||
var span = this.span; | var span = this.span; | ||
wlinrc_setText(span.firstChild, span.isWatched ? '[עקוב]' : '[ | wlinrc_setText(span.firstChild, span.isWatched ? '[עקוב]' : '[הפסק לעקוב]'); | ||
span.source.style.fontWeight = span.isWatched ? 'normal' : 'bolder'; | span.source.style.fontWeight = span.isWatched ? 'normal' : 'bolder'; | ||
span.style.color = span.isWatched ? 'blue' : 'red'; | span.style.color = span.isWatched ? 'blue' : 'red'; | ||
| שורה 47: | שורה 47: | ||
// in last changes page, with className of "'mw-watched'" to deduc that this page is watched. | // in last changes page, with className of "'mw-watched'" to deduc that this page is watched. | ||
span.isWatched = (getElementsByClassName(element, 'strong', 'mw-watched').length > 0); | span.isWatched = (getElementsByClassName(element, 'strong', 'mw-watched').length > 0); | ||
span.appendChild(document.createTextNode(span.isWatched ? '[ | span.appendChild(document.createTextNode(span.isWatched ? '[הפסק לעקוב]' : '[עקוב]')); | ||
$.extend(span.style, {cursor: 'pointer', color: span.isWatched ? 'red' : 'blue'}); | $.extend(span.style, {cursor: 'pointer', color: span.isWatched ? 'red' : 'blue'}); | ||
$.extend(span, {onclick: wlinrc_watchme, target: link, source: source}); | $.extend(span, {onclick: wlinrc_watchme, target: link, source: source}); | ||