Created
January 2, 2020 22:32
-
-
Save octaviantu/6765042defdaa627f93d1d48d102e1f0 to your computer and use it in GitHub Desktop.
Remove strong tags
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 Remove strong tags | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description remove answers | |
// @author octaviant | |
// @match http://*.jayendrapatil.com/* | |
// @grant GM_log | |
// @run-at document-end | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var allStrong = Array.from(document.getElementsByTagName("strong")); | |
GM_log(allStrong); | |
for (var i=0, max=allStrong.length; i < max; i++) { | |
var strong = allStrong[i]; | |
if(strong.parentNode.tagName == "LI") { | |
strong.parentNode.appendChild(strong.firstChild); | |
strong.parentNode.removeChild(strong); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment