I created a script for Tampermonkey to edit every Website, now I want to have, that this button right above the caps lock: –>| (on Mac) switches between buttons when I click on it. Currently it puts some spaces between the words, but that’s what i don’t want. Here’s my script:
// ==UserScript==
// @name Edit any Website
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function () {
'use strict';
// javascript:document.body.contentEditable = 'true' ;
document.designMode = 'on';
document.querySelectorAll('a').forEach((a) => {
a.addEventListener('click', (e) => {
location = e.currentTarget.href;
})
})
})();
Can someone help me?