Fri, 2014-10-31 02:02
I’m using an Android browser on my phone called Habit. I’m using a user script with it shown below. The user script works very well. But on some sites, text isn’t wrapped. What code do I use to force text wrap?
Here’s an example of a site that’s not wrapped along the edges of my screen:
www.sosuave.com/articles/at/investing.htm
// ==UserScript== // @name Userscript to Change Color of Font // @author Tommy Smith // @description Userscript for a browser for your Android phone. // @version 0.3 // @include * // ==/UserScript== var css = document.createElement(‘style’); css.type = “text/css”; css.innerHTML = “* { color: white !important; } <em>:not([class</em>='overlay']) { background-color: #333333 !important; } a { color: aqua !important; }”; document.getElementsByTagName(‘body’)[0].appendChild(css); document.getElementsByTagName(“body”)[0].setAttribute(“bgcolor”, “darkgray”); document.getElementsByTagName(“body”)[0].setAttribute(“text”, “white”); document.getElementsByTagName(“body”)[0].setAttribute(“alink”, “aqua”); document.getElementsByTagName(“body”)[0].setAttribute(“link”, “aqua”); document.getElementsByTagName(“body”)[0].setAttribute(“vlink”, “aqua”);