Advertisement

07.28.2008 at 08:04AM PDT, ID: 23601005
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Google Search Filter userscript (js) (opera) only lets me add one exclude rule. How do I add more? I need correct XPATH formatting.

Asked by ecstasylove in XPath, JavaScript, Opera Web Browser

Tags: , ,

Hello,


I've tried various methods but I can only get the Google Search Filter userscript to work with one filter rule. How do I sucessfully add a comma or something so

var spam = /(bbc)(shop|worldwide|america|world|goodfood|training|musicmagazine|wildlifemagazine|resources|food|wild|prime|active).com/;/(bbc).co.uk/;

will remove bbcshop.com, bbcworldwide.com etc and also bbc.co.uk and other domains?


Best Regards,
Thomas JoyStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
// ==UserScript==
// @name           Google Search Filter Ultimate + latest definitions (July 25th 2008) (part 3)
// @description    completely removes a list of bad urls results from appearing in google searches
// @version        1.0.1
// @author         Thomas Joy / ecstasyware
// @namespace      http://ecstasylove.org/
// @homepage       
// @include        http://www.google.com/custom*
// @include        http://www.google.co.uk/search*
// @include        http://www.google.com/search*
// @Note           
// ==/UserScript==
 
 
 
/* == Modified Script =========
 * name           Google Search Results Filter
 * description    Greasemonkey port of http://userstyles.org/style/show/303
 * version        
 * Written by pile0nades@gmail.com
 * 
 *
 * 
/* ======================================= */
 
 
 
 
 
 
 
 
 
var results = get("//div[@class='g']/h2[@class='r']/a[@class='l']");
 
//var spam = /(amazon|citysearch|experts-exchange|geeksquad|match|myhelpdesk|oreilly|rentspeed|socialgrid|tech24)\.com/;
/////var spam = regexpCase:http://gov.*\\.com/
/////var spam = regexpCase:http://.*\\.gov.uk/
 
//var spam = /(sky)\.com/;
//var spam = /(bbc)\.co.uk/;
 
 
     // "del.icio.us",
     // "buzzurl.jp",
     // "(a|b|r|mgw).hatena.ne.jp",
     // "1470.net",
     // "pookmark.jp",
     // "bookmarks.yahoo.co.jp",
     // "clip.(nifty|livedoor).com",
     // "(esearch|tag|pt.afl).rakuten.co.jp",
     // "psearch.yahoo.co.jp"
 
 
 
 
//var spam = /http://bbc.co.uk/;
//var spam = /.bbc.(co.uk|com)/;
 
 
var spam = /(bbc)(shop|worldwide|america|world|goodfood|training|musicmagazine|wildlifemagazine|resources|food|wild|prime|active).com/;/(bbc).co.uk/;
 
//= /(bbc).co.uk/;
 
//var spam = /.bbc.co.uk/;
 
//var spam = /().gov.(au|uk|za|im|my)/;
//var spam = /.gov.uk|im/;
 
 
 
 
 
for(var i = 0; i < results.snapshotLength; i++) {
  var l = results.snapshotItem(i);
  if(spam.test(l.href)) {
    l.parentNode.parentNode.style.display = "none";
  }
}
 
 
function get(query) {
  var result = document.evaluate(
    query,
    document,
    null,
    XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
    null
  );
  return result;
}
[+][-]07.28.2008 at 05:03PM PDT, ID: 22107767

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: XPath, JavaScript, Opera Web Browser
Tags: JavaScript, XPath, Opera 9.52 - Build 10093 (latest) (lab), http://google.co.uk/search?*
Sign Up Now!
Solution Provided By: Capt_Jack
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.13.2008 at 07:35PM PDT, ID: 22227466

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.29.2008 at 05:28AM PDT, ID: 22344641

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.02.2008 at 10:38AM PDT, ID: 22369535

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628