Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
updated RedditSearch sub specific header
Browse files Browse the repository at this point in the history
  • Loading branch information
majuscule committed Jun 10, 2012
1 parent 8ccb10e commit 16f9c3a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions share/spice/reddit_search/spice.js
Expand Up @@ -11,14 +11,9 @@ function ddg_spice_reddit(re) {
restrict_sr = 'true';
}
if (restrict_sr == 'true') {
if (subreddit.charAt(0) != '/') {
subreddit = '/' + subreddit;
}
if (subreddit.charAt(1) != 'r') {
subreddit = '/r' + subreddit;
}
subreddit.replace(/^\/?r\//g, "");
header = "(<a href='http://reddit.com" + subreddit
+ "'>" + subreddit + "</a>)";
+ "'>subreddit " + subreddit + "</a>)";
}
query = query.replace(/^\s*(\/?r\/\w+|reddit|subreddit\s*\w+)\s+/, "");
header = query + " " + header;
Expand Down

0 comments on commit 16f9c3a

Please sign in to comment.