<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ViolentMonkey script stopped working]]></title><description><![CDATA[<p dir="auto">Today, a script in Violentmonkey just stopped working.  It was fine before.  What is going on?  The script is one that I borrowed and modified to create a content stylesheet to modify certain elements on web pages.  The links no longer change colour the way they did before.  This is the script:</p>
<pre><code>// ==UserScript==
// @name     Content-style
// @namespace Violentmonkey Scripts
// @include  *
// @grant none
// ==/UserScript==
function addCss(cssString) {
    var newCss = document.createElement('style');
    newCss.type = "text/css";
    newCss.innerHTML = cssString;
    document.getElementsByTagName('head')[0].appendChild(newCss);
    console.log("appended css");
}

addCss (
  'a[href^="javascript:"] {                                            \
     color: #006000 !important; background-color: #FFD8D8 !important;  \
     background-image: none !important;                                \
   }                                                                   \
   a:visited {                             \
   	 color: #AA00AA !important;            \
     background-color: #FFFFB0 !important; \
     background-image: none !important;    \
   }                                       \
   a:hover {                            \
     color: #E00000 !important;         \
     background-color: #A0FFFF;         \
     background-image: none !important; \
   }                                    \
   :link[target="_blank"], :visited[target="_blank"],\
   :link[target="_new"],   :visited[target="_new"] { \
   cursor:  crosshair;                               \
   }                                                 \
   p {user-select: text !important;   \
   }                                  \
   div.back2top {height: auto !important; \
   }                                      \
   canvas {                           \
     border: 4px solid red!important; \
   }                                  \
');
</code></pre>
]]></description><link>https://forums.opera.com/topic/21495/violentmonkey-script-stopped-working</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 19:29:06 GMT</lastBuildDate><atom:link href="https://forums.opera.com/topic/21495.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Jun 2017 23:16:44 GMT</pubDate><ttl>60</ttl></channel></rss>