משתמש:1Or/96.js
מראה
הערה: לאחר הפרסום, ייתכן שיהיה צורך לנקות את זיכרון המטמון (cache) של הדפדפן כדי להבחין בשינויים.
- פיירפוקס / ספארי: להחזיק את המקש Shift בעת לחיצה על טעינה מחדש (Reload) או ללחוץ על צירוף המקשים Ctrl-F5 או Ctrl-R (במחשב מק: ⌘-R).
- גוגל כרום: ללחוץ על צירוף המקשים Ctrl-Shift-R (במחשב מק: ⌘-Shift-R).
- אדג': להחזיק את המקש Ctrl בעת לחיצה על רענן (Refresh) או ללחוץ על צירוף המקשים Ctrl-F5.
// from [[מדיה ויקי:סקריפטים/96.js]]
function doremove() {
var $this = $(this);
$.getJSON($this.siblings('span.mw-title').find('a:first').attr('href'));
$this.closest('.mw-changeslist-line-watched').removeClass('.mw-changeslist-line-watched')
.addClass('mw-changeslist-line-not-watched');//.hide();
unseen($this);
$this.remove();
}
function seen(obj) {
obj.before( // Thanks to חיים 7
$('<a>', {text: '♦', title: 'סמן עריכה כנקראה', href: '#nw'})
.css({marginLeft: '0.3em', marginRight: '0.1em', color: '#990066'}).click(doremove) );
$('.mw-changeslist-line-watched a.mw-title').before(
$('<a>', {text: '♦', title: 'סמן עריכה כנקראה', href: '#nw'})
.css({marginLeft: '0.3em', marginRight: '0.1em', color: '#990066'}).click(function() {
var $this = $(this);
$.getJSON($this.siblings('a.mw-title').attr('href'));
$this.closest('.mw-changeslist-line-watched').removeClass('.mw-changeslist-line-watched')
.addClass('mw-changeslist-line-not-watched').hide();
$this.remove();
} ) );
}
window.script96 = true;
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) == 'Recentchanges' ) {
$('.mw-changeslist-line-not-watched ').show();
seen($('.mw-changeslist-line-watched span.mw-title'));
$('.mw-changeslist-line-watched td.mw-enhanced-rc').before(
$('<a>', {text: '●', title: 'הסתר עריכה', href: '#nw'})
.css({marginLeft: '0.3em', marginRight: '0.1em', color: '#FFFF99'}).click(function() {
var $this = $(this);
$.getJSON($this.siblings('span.mw-title').find('a:first').attr('href'));
$this.remove();
} ) );
}