Last active
March 28, 2024 14:00
-
-
Save mcint/dc84d9378566dbb72dec5ae62bcda8bd to your computer and use it in GitHub Desktop.
violentmonkey script, for semantle.com - make similarity tiers visible at end of line
This file contains 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 New script semantle.com | |
// @namespace Violentmonkey Scripts | |
// @match https://semantle.com/* | |
// @grant none | |
// @version 1.0 | |
// @author mcint | |
// @description 3/27/2024, 10:18:04 PM | |
// ==/UserScript== | |
function modifyStory() { | |
var story = document.getElementById('similarity-story'); | |
if (story) { | |
story.innerHTML = story.innerHTML.replaceAll(/([0-9.]{3,}(<\/b>)?[,.]?)/g,'$1<br>'); | |
} | |
} | |
function checkForElement() { | |
if (document.getElementById('similarity-story')) { | |
modifyStory(); | |
clearInterval(interval); | |
} | |
} | |
var interval = setInterval(checkForElement, 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment