Created
April 27, 2017 07:21
-
-
Save ninja33/d4467318aa0f88b1c4940d17d21d40f3 to your computer and use it in GitHub Desktop.
add space between words of shanbay.com news article.
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
// @name Shanbay News Word Space | |
// @namespace https://github.com/ninja33 | |
// @version 0.1 | |
// @description Add space between words of Shanbay news article. | |
// @author Ninja Huang | |
// @match https://www.shanbay.com/news/articles/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
//console.log("Initial Finding Space ..."); | |
var i = setInterval(function() { | |
//console.log("Finding Space ..."); | |
var wordnumber = document.querySelectorAll('.word'); | |
if (wordnumber.lenght !== 0) { | |
//console.log("Found Space !"); | |
clearInterval(i); | |
for (let word of wordnumber) { | |
word.innerText = word.innerText + " "; | |
} | |
} | |
}, 100); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment