Last active
July 15, 2020 22:31
-
-
Save 12944qwerty/2e8b2741b19e8eeff1628028a782e88a to your computer and use it in GitHub Desktop.
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 Topic Saver | |
// @updateURL https://gist.github.com/12944qwerty/2e8b2741b19e8eeff1628028a782e88a/raw/2335b2fe9d1275766703fc5827327921fa754899/topic_save.js | |
// @version 0.1 | |
// @description An autosaver for topics on WoX. | |
// @author 12944qwerty | |
// @match https://worldofolympians.com/topic/view/* | |
// @match https://worldoflegend.eu/topic/view/* | |
// @match https://worldofpotter.com/topic/view/* | |
// @match https://worldofpotter.eu/topic/view/* | |
// @match https://worldofgladersunited.com/topic/view/* | |
// @match https://worldofmetahumans.com/topic/view/* | |
// @match https://worldofnephilim.com/topic/view/* | |
// @match https://worldofpotter.de/topic/view/* | |
// @match https://worldofwalkers.com/topic/view/* | |
// @match https://worldofthrones.com/topic/view/* | |
// @match https://worldofbendingarts.com/topic/view/* | |
// @match https://worldofunseenarts.com/topic/view/* | |
// @match https://worldofjademountain.com/topic/view/* | |
// @match https://worldofforgottendungeons.com/topic/view/* | |
// @match https://worldoffairytales.com/topic/view/* | |
// @match https://worldofsupernaturals.com/topic/view/* | |
// @match https://worldofalagaesia.com/topic/view/* | |
// @match https://worldofmysticfalls.com/topic/view/* | |
// @match https://worldofgalaxies.com/topic/view/* | |
// @match https://worldofmetahumans.com/topic/view/* | |
// @match https://worldofhungergames.es/topic/view/* | |
// @match https://worldofteenwolf.nl/topic/view/* | |
// ==/UserScript== | |
const elemId = 'topic-input'; | |
var user = document.querySelectorAll(".username-popup,.profile-link")[1].text; | |
document.getElementById(elemId).addEventListener('change', e => { | |
window.localStorage[elemId + window.location.href+user] = e.target.value; | |
}); | |
window.addEventListener('load', () => { | |
document.getElementById(elemId).value = window.localStorage[elemId + window.location.href+user]; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment