FIMFiction UserScripts 383 members · 0 stories
Comments ( 10 )
  • Viewing 1 - 50 of 10
arcum42
Group Admin

While I doubt I'll use this too much, since I like the new search, here's a script I quickly hacked up to add a button next to the search button that will search google for the input text + "site:fimfiction.net", doing effectively the same thing as the search did before the update. The main use for this would be if you want to search for something on the site other than a fanfic, say a blog or a user page.

https://greasyfork.org/en/scripts/6787-fimfiction-google-search

--arcum42

Sollace
Group Admin

Might I suggest some changes?

var google = $('<button type="button" class="search_google"></button>');
google.css({
"background-color":"#3c3d43",
"background-clip" : "padding-box",
"color" : "#c8cce0",
"vertical-align": "middle",
"padding": "9px",
"line-height": "14px",
"font-family": "FontAwesome",
"border": "1px solid rgba(0,0,0,0.2)",
"border-left": "none"});
$("#form_search_sidebar form").append(google);
google.click(function() {
window.location = "https://www.google.com/search?q=" + $("input.nav-bar-search").val() + "+site%3Afimfiction.net";
});

I shortened it a little and moved the button to inside the search form otherwise it might not work correctly with Controls Freak. Its height was also off by one pixel so I just quickly adjusted that by taking out the i element.

Edit: Also took out the extra arguments from the search url.

--Sollace

arcum42
Group Admin

3856832

Thanks, I've updated the script with your changes. The extra pixel was bugging me anyways, and I originally tried to put it in the search form but was having trouble getting it to take.

I was planning to clean things up a bit later anyways, so this saves me some trouble...

--arcum42

Sollace
Group Admin

3856847
Yeah, I find that with buttons in the form you have to add the type="button" to it. Otherwise it will just submit the form. That's because the default value for the type property is "submit".

--Sollace

3856756
Tried installing it just now, got the following error message:

Could not parse script:
Ignoring @match pattern http*://*.fimfiction.net/* because:
Error: @match: Could not parse the pattern.

arcum42
Group Admin

4053072


Not sure about that particular error, but it's been broken for a bit. I suppose I should fix it, but knighty implemented most of the reasons I'd made it, so I haven't gotten around to it...

--arcum42

4054171
Well, I've been trying to do new installs on a replacement computer, so I'm just trying to cover myself. If this is no longer needed, though, I won't worry about it.

arcum42
Group Admin

4054212

I mainly had wanted to be able to search blogs, and you can do that now. It would be useful if you were searching for forum posts, but that's about the only thing that I can think of offhand to do with it...

--arcum42

4054295
Not gonna lie: there have been times when such a function would have been useful to me.
But I may be a rare exception, I don't know...

  • Viewing 1 - 50 of 10