Search Unity

Browser extensions to search within a forum thread

Discussion in 'General Discussion' started by movra, Jul 11, 2016.

  1. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    Threads on this forum can grow to tens of pages. If you're looking for a specific keyword, good luck flipping pages for a while.

    However I found out it's possible to search within a thread on XenForo based forums, but for some reason the menu for it has never been exposed on the Unity forum. So I made a Chrome extension to fix that. And now another one for Firefox.

    I never uploaded it to the Chrome Web Store because I'd probably be breaking several Unity EULAs.

    To celebrate the return of the old forum, I'll share with you the raw, unpacked Chrome extension that allows you to search within threads in this forum. Maybe it will inspire someone to build this functionality into the new forum.

    upload_2015-11-20_0-45-35.png

    Download for Chrome: Unity Forum Search 2.zip

    V2 Changelog: not hardcoded to forum-old.unity3d.com anymore.

    To install:

    Download for Firefox: @xenforo-search-in-thread-0.0.2.xpi (unsigned beta)

    Known issues:
    To install:
    • in the Firefox address bar type about:config, then set xpiinstall.signatures.required to false
    • download the xpi from the link above
    • drag the xpi onto Firefox; an install popup will be displayed with a warning that the AddOn is unsigned
    Usage:
    • a Unity icon will light up when in a forum thread
    • click the icon and enter your keywords in the popup
    • keywords are matched exactly by default (eg. eula won't match EULAs)
    • you can use the * wildcard character for partial matches (eg. eula* will match EULAs)
     
    Last edited: Feb 11, 2017
    2dgame, chelnok, eses and 3 others like this.
  2. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Cool. Could you port it over to FireFox?
     
  3. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    Looks like the Chrome extension also works with FireFox since it uses the same WebExtension format, but it would have to be submitted to addons.mozilla.org to have it reviewed and signed, even for private usage. That takes 5 days. More importantly there's the legal barrier again with the Unity trademark and design.

    You could probably create a bookmarklet with the same functionality. Though personally I don't like the bookmark toolbar taking up precious browser space.
     
  4. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    No, no. FF AFAIK uses XSL which Chrome does not.
     
  5. 2dgame

    2dgame

    Joined:
    Nov 24, 2014
    Posts:
    83
    Thanks, this is great. However, I just tried the search on this thread, looking for the word 'EULAs' in your starting post. While 'eulas' and 'eula*' does find the post, 'eula' does not. Maybe you could make it look for parts of words as well, or have a toggle in preferences for it?
    e.: Scrap that. On second thought I can imagine situations where you don't want this to happen, if your searching for a specific short word that often occures in other words.

    Now we just need someone to make a dark old-forum skin for stylish :) The one for the new forums was great.
     
    Last edited: Jul 11, 2016
  6. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    I see. But it looks like FireFox will deprecate XPCOM- and XUL-based add-ons in favor of WebExtensions. By the way, Microsoft Edge will also adopt WebExtensions.

    WebExtensions are currently in an experimental alpha state. From Firefox 46, you can publish WebExtensions to Firefox users, just like any other add-on. We're aiming for a first stable release in Firefox 48. Firefox 48, based on Gecko 48, will ship in August 2016.

    But I'll see what I can do with the other APIs.

    Seems to be hardcoded in XenForo. XenForo developers recommend using the * wildcard character in your keyword instead.

    https://xenforo.com/community/threads/how-to-set-search-to-wildcard-by-default.23239/
     
  7. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    I extracted the url string just for convenience for those who want this without having to use chrome.

    http://forum-old.unity3d.com/search/1/?q=" + query + "&t=post&o=relevance&c[thread]=" + threadId
    http://forum-old.unity3d.com/search/1/?q=Firefox&t=post&o=relevance&c[thread]=415323

    fyi js bookmarklets don't even work in newer Firefox versions by default anymore, those Morons at Mozilla have been seriously dumbifying the browser to compete with dumbed down chrome crap over past few years.. you gotta enable a bunch of extra stuff in the about:config to get them working again now, and even after doing that they remain somewhat broken unlike before.

    Pretty sad watching Firefox take itself down the toilet, I'd sack alot of those idiots at Mozilla. The point about it being harder to just make a extension for Firefox now truly is sad. I mean you can still make the extension, but the loops end users have to goto just to use an unsigned extension is silly.

    "Though personally I don't like the bookmark toolbar taking up precious browser space."

    unlike restricted chrome crap, firefox interface is customizable, you don't need the fat bookmark toolbar to have bookmarks (or just favicons of bookmark icons on any existing toolbar) https://userstyles.org/styles/23082/bookmarks-toolbar-selective-favicons etc
     
    Martin_H likes this.
  8. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    "I see. But it looks like FireFox will deprecate XPCOM- and XUL-based add-ons in favor of WebExtensions. By the way, Microsoft Edge will also adopt WebExtensions."

    Mozilla might aswel start putting up for sale signs on there building lots when they do that.. complete fools.
     
  9. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    Looks like they are targeting the end of this year https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/
     
  10. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,128
    Mozilla may as well have gone out of business when Chrome overtook Firefox's market share.
     
  11. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    I've added an experimental build for Firefox to the first post. See if it works for you.
     
  12. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    The Unity forum doesn't redirect to forum-old.unity3d.com anymore. I've updated the Chrome extension to remove the hardcoded URL. Now it should work with any XenForo forum thread with the URL matching /threads/.

    The Firefox extension already didn't have a hardcoded URL.
     
  13. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    This should be a sticky-thread until somebody wakes up and re-enables the XenForo feature.
     
    movra likes this.
  14. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @movra

    this looks great, however, I tried installing xpi to Firefox beta 48.0b7 and couldn't get it to work

    I get a popup saying can't install... and something else can't remember.

    I did set the xpi setting from about:config like you wrote in OP.
     
  15. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Is there a reason the extension has to run in dev mode in Chrome?
    I get this warning every time I open a new Chrome window.

    1.png
     
  16. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    I don't have the 48 beta installed. Maybe Firefox 48 enforces signed extensions regardless of the about:config setting.
     
  17. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    That's because the extension is unsigned and therefore deemed potentially unsafe for end-users. I don't have the guts to submit the extension to the Chrome store in its current form after reading the Unity EULAs. Also I'd have to pay Google $5 and I don't want to submit my credit card details to them unless they give money to me instead.

     
  18. 2dgame

    2dgame

    Joined:
    Nov 24, 2014
    Posts:
    83
    if only there was a way to tell chrome to accept the extension for good. pops up everytime i open chrome
     
  19. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    That should only happen after you close all Chrome windows and open a new Chrome window. The way I use Chrome at least one window is open for days, so I don't see that popup very often. But I can imagine it's annoying if you tend to restart Chrome often.

    The solution is to upload the extension to the Chrome Web Store, have it signed and install it from there. I explained why I won't do that. However, feel free to rebrand the extension, replace the icons and any other references to Unity, put your own name in the manifest and submit it to the Chrome Web Store.

    Remember though, the main purpose of these extensions is not to provide a workaround but that somebody from Unity

     
    eses, MV10 and 2dgame like this.
  20. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
  21. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
  22. 2dgame

    2dgame

    Joined:
    Nov 24, 2014
    Posts:
    83
    Has anyone tried MV10's method to make chrome accept the extension or found another way to get rid of the warning everytime you open chrome?
     
  23. PhilAR

    PhilAR

    Joined:
    Jul 18, 2015
    Posts:
    3
    You are a beautiful person for making and sharing this!! I just saved a day of searching.
     
    movra likes this.
  24. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    566
    Looks like the Search In Thread feature has finally been enabled in the forum itself!

    upload_2017-2-14_14-39-46.png
     
    MV10 likes this.
  25. SaraCecilia

    SaraCecilia

    Joined:
    Jul 9, 2014
    Posts:
    675
    Yep, we just implemented the plugin :) So happy about this!
     
    MV10, Martin_H and movra like this.
  26. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Mostly. I would ask again that you guys test this stuff out on mobile before going live.

    IMG_1045.PNG
     
    Debhon, Ryiah, Pengocat and 1 other person like this.