|
|
Line 1: |
Line 1: |
| == Adding search rules == | | == Adding search rules == |
| The preferred way to add custom search rules to the Firefox add-on is to edit [http://kb.mozillazine.org/User.js_file the user.js file] in your Firefox profile folder using a text editor. | | The preferred way to add custom search rules to the Firefox add-on is to edit [http://kb.mozillazine.org/User.js_file the user.js file] in your Firefox profile folder using a text editor. |
− | | + | ESKDJIGJEISKDJIGEWJSDKFM |
− | == User-contributed search rules ==
| |
− | Here is a list of additional search rules you can add to your WOT configuration:
| |
− | | |
− | === Ecosia ===
| |
− | [http://ecosia.org/ Ecosia] gives at least 80% of their search income to a rainforest protection program run by [http://www.panda.org/ WWF].
| |
− | | |
− | '''user_pref'''("weboftrust.search.ecosia.display",
| |
− | "<span style="color: blue;">Ecosia</span>");
| |
− | '''user_pref'''("weboftrust.search.ecosia.url",
| |
− | "<span style="color: blue;">^http(s)?\\:\\/\\/(ssl\\.|www\\.)*ecosia\\.org\\/search\\.php\\?</span>");
| |
− | '''user_pref'''("weboftrust.search.ecosia.ign",
| |
− | "<span style="color: blue;">^http(s)?\\:\\/\\/([\\w\\-]+\\.)*(ecosia\\.org|bingj\\.com)\\/</span>");
| |
− | '''user_pref'''("weboftrust.search.ecosia.prestyle",
| |
− | "<span style="color: blue;">a[target] ~ [ATTR] { display: none ! important; }</span>");
| |
− | '''user_pref'''("weboftrust.search.ecosia.style",
| |
− | "<span style="color: blue;">a ~ [ATTR=\"NAME\"] { background: url(IMAGE) right no-repeat; }</span>");
| |
− | '''user_pref'''("weboftrust.search.ecosia.pre0.match", <span style="color: blue;">3</span>);
| |
− | '''user_pref'''("weboftrust.search.ecosia.pre0.re",
| |
− | "<span style="color: blue;">^http(s)?\\:\\/\\/([\\w\\-]+\\.)*ecosia\\.org\\/goto\\.php\\\\?.*&u=(http[^&]+)</span>");
| |
− | | |
− | Note: the <tt>prestyle</tt> rule stops another rating symbol from appearing next to the "Open in a new tab" icon.
| |
− | | |
− | There is also a [https://addons.mozilla.org/firefox/addon/Web-Of-Trust-WOT-rating-Ecosia/ restartless addon] available from an independent developer which adds these rules.
| |
− | | |
− | === Yauba ===
| |
− | [http://www.yauba.com/ Yauba] is a real-time search engine focused on privacy.
| |
− | | |
− | '''user_pref'''("weboftrust.search.yauba.display",
| |
− | "<span style="color: blue;">Yauba</span>");
| |
− | '''user_pref'''("weboftrust.search.yauba.url",
| |
− | "<span style="color: blue;">^http(s)?\\:\\/\\/(www\\.)?yauba\\.com\\/</span>");
| |
− | '''user_pref'''("weboftrust.search.yauba.ign",
| |
− | "<span style="color: blue;">^http(s)?\\:\\/\\/(www\\.)?yauba\\.com\\/</span>");
| |
− | '''user_pref'''("weboftrust.search.yauba.style",
| |
− | "<span style="color: blue;">h1 a ~ [ATTR=\"NAME\"] { background: url(IMAGE) right no-repeat; }</span>");
| |
− | | |
− | == Creating your own rules ==
| |
− | If you know how to write [http://www.w3.org/TR/CSS2/selector.html CSS selectors] and [http://regular-expressions.info regular expressions] you can also make your own rules.
| |
− | | |
− | You can quickly test your own rules by adding them to [http://kb.mozillazine.org/About:config about:config] and editing them. You can create rules using the following table:
| |
− | {| style="border:1px solid black;border-collapse:collapse;" cellpadding="2"
| |
− | |-
| |
− | ! scope="col" width="400" style="border:1px solid black" | Prefix
| |
− | ! style="border:1px solid black"|Description
| |
− | |-
| |
− | | style="border:1px solid black" |weboftrust.search.<nowiki><the name of your rule></nowiki>.'''display'''
| |
− | | style="border:1px solid black" |The name that will displayed at the WOT search engine settings page
| |
− | |-
| |
− | | style="border:1px solid black" |weboftrust.search.<nowiki><the name of your rule></nowiki>.'''url'''
| |
− | | style="border:1px solid black" |A JavaScript regular expression matching the page at which WOT will run. Please note that special characters will be have to escaped ONCE if you add rules via about:config and TWICE if you enter your rules in the user.js file.
| |
− | |-
| |
− | | style="border:1px solid black" |weboftrust.search.<nowiki><the name of your rule></nowiki>.'''ign'''
| |
− | | style="border:1px solid black" |A JavaScript regular expression matching the site WOT runs at, for which ratings will NOT be shown. Again, please mind that you'll have to encode special characters.
| |
− | |}
| |