User:PleaseStand/userScriptSandbox.js: Difference between revisions

Content deleted Content added
m avoid causing error in IE 6
prevent clickjacking
Line 3:
* http://en.wikipedia.org/wiki/Wikipedia:User_script_sandbox
*
* Copyright 2012 Wikipedia user PleaseStand
*
* Licensed under the Creative Commons Attribution-Share-Alike 3.0 Unported License,
Line 187:
// On the sandbox page, run the editor instead of the code in the sandbox.
if ( mw.config.get("wgAction") === "view" &&
mw.config.get("wgNamespaceNumber") === settings.sandboxNamespaceNumber &&
mw.config.get("wgTitle") === settings.sandboxPageTitle )
{
 
// Prevent clickjacking.
if ( window.top !== window.self ) {
return;
}
 
mw.loader.using( editor.dependencies, function() {
$( editor.show );
});
 
}
else