מדיה ויקי:Gadget-watchlistMark.js: הבדלים בין גרסאות בדף

מ החלפת bodyContent בmw.util.$content
להראות את הקישוריות רק אם רוצים אותן
שורה 18: שורה 18:
colorWatched();
colorWatched();
});
});
}
}


function watchText(watch) { return (isCat ? ' ':'') + (watch ? '[עקוב]' : '[הסר]');}
function watchText(watch) { return (isCat ? ' ':'') + (watch ? '[עקוב]' : '[הסר]');}
שורה 40: שורה 40:
});
});
}
}
 
function watchIt(span, page) {
function watchIt(span, page) {
var watched = span.hasClass('unwatchit-link');
var watched = span.hasClass('unwatchit-link');
שורה 57: שורה 57:
});
});
}
}
 
$("<style type='text/css'> \n" +
mw.util.addCSS(
".unwatchit-link{color:#a00; cursor: pointer; font-size: 70%;}  \n" +
".unwatchit-link{color:#a00; cursor: pointer; font-size: 70%;display:none}  \n" +
".watchit-link{color:#008; cursor: pointer; font-size: 70%;}  \n" +
".watchit-link{color:#008; cursor: pointer; font-size: 70%;display:none}  \n" +
".iswatched{font-weight: bolder;}  \n" +
".iswatched{font-weight: bolder;}  \n" +
"</style> "
"</style> "
).appendTo("head");
)
readWatchList();
readWatchList();
var showLink = $('<a>', {href: '#', text:'הצג קישוריות מעקב'}).click(
function(){
mw.util.addCSS('.unwatchit-link,.watchit-link{display:inline;}');
$(this).remove();
}
);
if ($('#contentSub a').length)
$('#contentSub a:last').after(showLink).after(' | ');
else
$('#contentSub').append(showLink);
 
}); // document ready
}); // document ready