Skip to content

Instantly share code, notes, and snippets.

@Himura2la
Created April 1, 2020 06:43
Show Gist options
  • Save Himura2la/6f272e8d41a2092ef64f8bc6cf1ce49f to your computer and use it in GitHub Desktop.
Save Himura2la/6f272e8d41a2092ef64f8bc6cf1ce49f to your computer and use it in GitHub Desktop.
User script used to update page contents
// ==UserScript==
// @name Page Manipulation
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Updates page contents
// @author [email protected]
// @include https://target.site/*
// @grant none
// ==/UserScript==
let updater = setInterval(update, 1)
function update() {
if (document.getElementById("LC1").children[2].innerHTML != "new-text"){
document.getElementById("LC1").children[2].innerHTML = "new-text"
// other edits
clearInterval(updater)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment