It says "the script doesn't contain any @grant tags" and doesn't work.
Posts made by ozpa
-
RE: Want to use an old script from v12 in Opera BetaOpera add-ons
-
Want to use an old script from v12 in Opera BetaOpera add-ons
Hi all!
One of the reasons I'm still using v12 along Opera Beta (which I love too) is I'm using this Word Highlighting script that I really really need. I wanted to ask you guys how could I transfer the script (or make it work the same as in v12) to Opera Beta. The script I'm reffering to is here:http://extendopera.org/userjs/content/highlight-words
Thanks in advance!
P.S. if there's a better way around it then the idea is that all I need is a file which I could add/remove words from that would act a list for words to be highlighted.
-
RE: Migrated 12.11->12.17, now my js doesn't workOpera for Windows
Found it! (thanks to your bullet point "set path to all your UserJS files with opera:config#UserPrefs|UserJavaScriptFile")
Noticed 1 small thing below the path to user scripts, remembered that my links were in HTTPS so I enabled a checbox below and wuala!
http://i.imgur.com/0Tm5luD.jpg
Much love angiesdom
-
RE: Migrated 12.11->12.17, now my js doesn't workOpera for Windows
Sorry I can't edit my 1st post, here's a tidier version on pastebin:
-
Migrated 12.11->12.17, now my js doesn't workOpera for Windows
Hi all!
I only have a single script that highlights words on the page for me that match the list in the script. He's my script:// ==UserScript==
// @name Highlight Words
// @author bpm
// @version 1.1
// @description Highlights works from an array
// @include https://www.examplesite.com/*
// ==/UserScript==
// 1.1 Updated by Frenzie, added easy to configure wordlist
(function () {
var wordlist=[
/@Wordlist (quote properly and use commas between values)@string@/"word 1",
"word 2",
"word 3",
"word 4",/@/
];
// other config
var highlightBgColor = /@Highlight background color@string@/'grey'/@/;
var highlightColor = /@Highlight font color@string@/'grey'/@/;function hilite(text){ var count=0,dv; dv=document.defaultView; function searchWithinNode(node,te,len){ var pos,skip,spannode,middlebit,endbit,middleclone; skip=0; if(node.nodeType==3){ pos=node.data.toUpperCase().indexOf(te); if(pos>=0){ spannode=document.createElement('SPAN'); spannode.style.backgroundColor=highlightBgColor; spannode.style.color=highlightColor; spannode.style.fontWeight='bold'; middlebit=node.splitText(pos); endbit=middlebit.splitText(len); middleclone=middlebit.cloneNode(true); spannode.appendChild(middleclone); middlebit.parentNode.replaceChild(spannode,middlebit); ++count; skip=1; } } else if(node.nodeType==1&& node.childNodes && node.tagName.toUpperCase()!='SCRIPT' && node.tagName.toUpperCase!='STYLE'){ for (var child=0;child<node.childNodes.length;++child){ child=child+searchWithinNode(node.childNodes[child],te,len); } } return skip; } searchWithinNode(document.body,text.toUpperCase(),text.length); } document.addEventListener('DOMContentLoaded',function() { for (i=0; i<wordlist.length; i++) { hilite(wordlist[i]); } }, false);
})();