User:TonyBallioni/global.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// [[File:Krinkle_CVNSimpleOverlay_wiki.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/CVNSimpleOverlay_wiki.js&action=raw&ctype=text/javascript');
/*
Author : Svetlana Tkachenko svetlana@members.fsf.org
This file is a part of truncateEditSummaryWithClickableEllipsis.js.
Licence: GPLv3+
Version: 0.1.1
Release date: 2018-03-05
Description: truncates edit summary (not in diff views) with clickable ellipsis
*/
if($('.diff-otitle').length === 0){
var n = 250;
$('.comment').each(function(i){
var original = $(this).text();
if(original.length > n){
var $a = $('<a></a>',{
href: "javascript:void(0)",
text: "..."
});
$a.click(function(){
$(this).parent().text(original);
});
var shortText = $.trim(original).substring(0, n).trim(this);
shortText = shortText + " [";
$(this).text(shortText);
$(this).append($a);
$(this).append('])');
}
});
}
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js');
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Xiplus/TwinkleGlobal.js&action=raw&ctype=text/javascript');