Created
June 7, 2019 07:22
-
-
Save theand/648dae5f82bc1272e3918b07ca27d050 to your computer and use it in GitHub Desktop.
designmode-on
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name designmode-on | |
// @namespace http://127.0.0.1 | |
// @description User Script for designmode-on | |
// @author Heesang Chae | |
// @include * | |
// @require https://cdn.jsdelivr.net/gh/theand/userscript-util@latest/exec.js | |
// @version 2018.01.09 | |
// @grant none | |
// ==/UserScript== | |
/*global userscript_util*/ | |
/* ref: | |
* https://twitter.com/IMAC2/status/1135875294156480512 | |
* https://developer.mozilla.org/en-US/docs/Web/API/Document/designMode | |
*/ | |
const userscript = function (GM_info) { | |
console.group(GM_info.script.name); | |
userscript_util.exec.logGmInfo(GM_info); | |
try { | |
document.designMode = "on"; | |
} catch (err) { | |
userscript_util.exec.logGmError(GM_info, err); | |
} | |
console.groupEnd(); | |
}; | |
if(top.document.location === self.document.location) { | |
userscript_util.exec.executeLater(userscript, GM_info, 1500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment