Website to editor

Easy to edit anything in website.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Website to editor
// @namespace    http://tampermonkey.net/
// @icon         https://scontent.fdad1-1.fna.fbcdn.net/v/t1.0-9/10346186_1645759148993427_6744387242769246115_n.jpg?_nc_cat=102&_nc_ht=scontent.fdad1-1.fna&oh=b460d464946fcbcb92d4783d903412ef&oe=5C8F4A97
// @version      0.1
// @description  Easy to edit anything in website.
// @author       HuuKhanh
// @include http://*/*
// @include https://*/*
// @grant        none
// ==/UserScript==

/*
- Enter rate to search bar then press '`' to change raterate
*/
(function() {
    'use strict';
    document.getElementsByTagName('html')[0].setAttribute("contenteditable", "false");
    document.getElementsByTagName('html')[0].addEventListener("keydown", function(event) {
	var x = event.which || event.keyCode;
    var isShiftKey = event.shiftKey;
	if(x == 69) {
		var isEnable = document.getElementsByTagName('html')[0].getAttribute("contenteditable");
        console.log(isEnable);
        console.log(isShiftKey);
        if(isEnable === 'false' && isShiftKey) {
            document.getElementsByTagName('html')[0].setAttribute("contenteditable", "true");
        }
		else {
            document.getElementsByTagName('html')[0].setAttribute("contenteditable", "false");
        }
	}
}) ;
})();