Skip to content

Instantly share code, notes, and snippets.

@ninja33
Created April 27, 2017 07:21
Show Gist options
  • Save ninja33/d4467318aa0f88b1c4940d17d21d40f3 to your computer and use it in GitHub Desktop.
Save ninja33/d4467318aa0f88b1c4940d17d21d40f3 to your computer and use it in GitHub Desktop.
add space between words of shanbay.com news article.
// @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