(Created page with "→Any JavaScript here will be loaded for all users on every page load.: if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) { document.body.classList....") |
No edit summary |
||
Line 3: | Line 3: | ||
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) { | if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) { | ||
document.body.classList.add( 'mw-rcfilters-ui-initialized' ); | document.body.classList.add( 'mw-rcfilters-ui-initialized' ); | ||
} | |||
function copyToClipboard(element) { | |||
var $temp = $("<input>"); | |||
$("body").append($temp); | |||
$temp.val($(element).text()).select(); | |||
document.execCommand("copy"); | |||
$temp.remove(); | |||
} | } |
Revision as of 13:33, 20 April 2023
/* Any JavaScript here will be loaded for all users on every page load. */
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist' ) {
document.body.classList.add( 'mw-rcfilters-ui-initialized' );
}
function copyToClipboard(element) {
var $temp = $("<input>");
$("body").append($temp);
$temp.val($(element).text()).select();
document.execCommand("copy");
$temp.remove();
}