Skip to content

Instantly share code, notes, and snippets.

@mcint
Last active March 28, 2024 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mcint/dc84d9378566dbb72dec5ae62bcda8bd to your computer and use it in GitHub Desktop.
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
// ==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