Skip to content
  • To view the full website,
    you can click here at any time
[Userscript] Extended Top Bar Search [Dec 6th]
  • RR Xiphias [187717]Xiphias [187717]
    • Xiphias [187717]
    • Status: Civilian
    • Level: 45
    • Posts: 306
    • Karma: 71
    • Last Action: Now
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this thread. Rating limit has been reached.
    Thread created on 17:18:21 - 25/07/14 (4 month ago)
    |
    Last replied 15:03:42 - 06/12/14 (13 days ago)
    What is this userscript about?

        This script adds four new search functions in the top bar:

    • "Place": Go to any place in Torn directly from any page in Torn.
    • "Item Market": Search for any item in the Item Market from any page in Torn.
    • "Name": Added autocomplete to the Name search with direct navigation to user profile when selecting a user from the suggestions list. You can still search the old way by typing a text and hitting enter.
    • "Forum posts": Search for forum using filters.
     
        Other features:

            The script will remember the last used search option so if there is one search you end up using regularly you don't have to reselect it all the time from the drop-down menu.
       
            Shortcut: Press Alt+G to move the focus to the search field.
     
    Screenshots:


    --- NEWEST FEATURE ---
    Forum Search
    Forum Search
     
    Extended Name Search
    Extended Name Search

    Item Market Search
    Item Market search

    Place search:
    Place search

    Installation:

        Install Greasemonkey if you are Firefox: Greasemonkey Addon for Firefox.
        Install Tampermonkey if you are using Chrome: Tampermonkey Extension for Chrome

        Finally install the userscript: Extended Top Bar Search by Xiphias[187717]

    Known Bugs:
        - None at the moment.


    Changelog:
    • 0.60.3: Added a Forum search function.
    • 0.60.2: Fixed a Chrome bug that caused the input field to bounce to the left on the first search
    • 0.60.1: Small syntax fixes
    • 0.60.0: Few new places added. Also added a new feature Name search. Name search now comes with autocomplete.
    • 0.55: "Notebook" place added.
    • 0.54: Fixed layout issue on Firefox.
    • 0.53: "Your Gallery" place added.
    • 0.52: Fixed minor bug: Criminal Record on the Crimes page didn't load properly.
    • 0.51: FIXED THE CHROME BUG. The script now works with Tampermonkey on Chrome. Thanks Mauk for the quick fix.
    • 0.50: First release
     
     
    *Shamelessly stole post-layout from Vinkuun.

    Last edited by Xiphias on 15:01:44 - 06/12/14
  • RR Aristotle [1481808]Aristotle [1481808]
    • Aristotle [1481808]
    • Status: Civilian
    • Level: 60
    • Posts: 347
    • Karma: 22
    • Last Action: 1 hours
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 17:50:26 - 25/07/14 (4 month ago)
    thanks. rated up. trying it out now.
  • JFA four [254727]four [254727]
    • four [254727]
    • Status: Civilian
    • Level: 44
    • Posts: 4722
    • Karma: 291
    • Last Action: 2 hours
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 18:09:29 - 25/07/14 (4 month ago)
    Wow I hadn't even thought about using the top bar for these sort of things. Good idea! Too bad it doesn't work on Tampermonkey :(
    Last edited by four on 18:14:36 - 25/07/14
  •   Mauk [1494436]Mauk [1494436]
    • Mauk [1494436]
    • Status: Civilian
    • Level: 35
    • Posts: 224
    • Karma: 142
    • Last Action: 1 hours
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 18:16:19 - 25/07/14 (4 month ago)
    Pretty sweet! :)

    What string diffing/searching algorithm are you using? I did a similar feature for my (yet unreleased) extension using the Bitap matching algorithm and I really like it, so far.
  • RR Xiphias [187717]Xiphias [187717]
    • Xiphias [187717]
    • Status: Civilian
    • Level: 45
    • Posts: 306
    • Karma: 71
    • Last Action: Now
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 20:19:42 - 25/07/14 (4 month ago)

    four [254727]

    Wow I hadn't even thought about using the top bar for these sort of things. Good idea! Too bad it doesn't work on Tampermonkey :(

    I just did a quick test with chrome and I couldnt get it to work. Not sure how to fix it but I will take a look at it again later.

  •   Mauk [1494436]Mauk [1494436]
    • Mauk [1494436]
    • Status: Civilian
    • Level: 35
    • Posts: 224
    • Karma: 142
    • Last Action: 1 hours
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 21:06:31 - 25/07/14 (4 month ago)

    Xiphias [187717]

     

    four [254727]

    Wow I hadn't even thought about using the top bar for these sort of things. Good idea! Too bad it doesn't work on Tampermonkey :(

    I just did a quick test with chrome and I couldnt get it to work. Not sure how to fix it but I will take a look at it again later.

    The thing is, they are using jQuery-ui's selectmenu widget. I don't know why it's working on Firefox, but you should refresh the widget after adding the options:

    $('#search-type').selectmenu();

    This should do, at least for the visual glitch (there may be other unrelated problems).
  • HofI CarolDanvers [1701260]CarolDanvers [1701260]
    • CarolDanvers [1701260]
    • Status: Civilian
    • Level: 45
    • Posts: 682
    • Karma: 205
    • Last Action: 27 minutes
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 21:16:31 - 25/07/14 (4 month ago)
    great stuff. Karma+
  • RR Xiphias [187717]Xiphias [187717]
    • Xiphias [187717]
    • Status: Civilian
    • Level: 45
    • Posts: 306
    • Karma: 71
    • Last Action: Now
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 21:48:52 - 25/07/14 (4 month ago)
     

    Mauk [1494436]

    Pretty sweet! :)

    What string diffing/searching algorithm are you using? I did a similar feature for my (yet unreleased) extension using the Bitap matching algorithm and I really like it, so far.

    I was thinking about using some fuzzy string search for the search suggestions but I ended up only using jQuery's autocomplete. The data was manually picked from the game and is hardcoded in the script. Im thinking to add autocomplete to Name search. Just reuse the one used in Mailbox Compose. There is an ajax function you can use/call.

    h
    ad to use URLLink format to be able to paste on the phone lol wtf.

    Last edited by Xiphias on 21:56:10 - 25/07/14
  •   Mauk [1494436]Mauk [1494436]
    • Mauk [1494436]
    • Status: Civilian
    • Level: 35
    • Posts: 224
    • Karma: 142
    • Last Action: 1 hours
    • Quote
    • Report
    • 1
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 22:23:00 - 25/07/14 (4 month ago)
     

    Xiphias [187717]

     

    Mauk [1494436]

    Pretty sweet! :)

    What string diffing/searching algorithm are you using? I did a similar feature for my (yet unreleased) extension using the Bitap matching algorithm and I really like it, so far.

    I was thinking about using some fuzzy string search for the search suggestions but I ended up only using jQuery's autocomplete. The data was manually picked from the game and is hardcoded in the script. Im thinking to add autocomplete to Name search. Just reuse the one used in Mailbox Compose. There is an ajax function you can use/call.

    h
    ad to use URLLink format to be able to paste on the phone lol wtf.

    Nice. :)

    The bitap algorithm is actually a fuzzy string matching. I wonder which one the jQuery Autocomplete uses..

    In my case I might still scrap it for a custom one. The search pool is a mix of fixed and partly dynamic strings, and I haven't found any fuzzy search that's readily extendable to handle the dynamic parts... So I do a custom search first + bitap later, but might end up going fully custom if it proves useful.

    Good call on the mailbox ajax! Had not thought of that.

    ps. lol, the url :PPP

    Last edited by Mauk on 22:26:42 - 25/07/14
  • RR Xiphias [187717]Xiphias [187717]
    • Xiphias [187717]
    • Status: Civilian
    • Level: 45
    • Posts: 306
    • Karma: 71
    • Last Action: Now
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 23:22:24 - 25/07/14 (4 month ago)

    Mauk [1494436]

     

    Xiphias [187717]

     

    four [254727]

    Wow I hadn't even thought about using the top bar for these sort of things. Good idea! Too bad it doesn't work on Tampermonkey :(

    I just did a quick test with chrome and I couldnt get it to work. Not sure how to fix it but I will take a look at it again later.

    The thing is, they are using jQuery-ui's selectmenu widget. I don't know why it's working on Firefox, but you should refresh the widget after adding the options:

    $('#search-type').selectmenu();

    This should do, at least for the visual glitch (there may be other unrelated problems).

    Worked! Thanks. Such a simple solution :)

  • M&C2 Vinkuun [1791283]Vinkuun [1791283]
    • Vinkuun [1791283]
    • Status: Civilian
    • Level: 39
    • Posts: 299
    • Karma: 143
    • Last Action: 1 hours
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 09:35:17 - 26/07/14 (4 month ago)

    Xiphias [187717]

    [...]

    *Shamelessly stole post-layout from Vinkuun.

    You're welcome :) Glad there are other people wanting to make Torn a more user-friendly place.

    Nice script :)

  • IBB Dexter [1381769]Dexter [1381769]
    • Dexter [1381769]
    • Status: Civilian
    • Level: 55
    • Posts: 938
    • Karma: 157
    • Last Action: 9 minutes
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 03:42:27 - 27/07/14 (4 month ago)
    Very nice scipt, love it!
    R+
  • RR Xiphias [187717]Xiphias [187717]
    • Xiphias [187717]
    • Status: Civilian
    • Level: 45
    • Posts: 306
    • Karma: 71
    • Last Action: Now
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 09:20:54 - 27/07/14 (4 month ago)

    Dekloren [900534]

    Rfc check failed.

    When did you get it? Which place did you try to go to? This could be because you have many tabs with Torn open on your browser.

  • M&C2 Vinkuun [1791283]Vinkuun [1791283]
    • Vinkuun [1791283]
    • Status: Civilian
    • Level: 39
    • Posts: 299
    • Karma: 143
    • Last Action: 1 hours
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 09:31:13 - 27/07/14 (4 month ago)
     

    Xiphias [187717]

     

    Dekloren [900534]

    Rfc check failed.

    When did you get it? Which place did you try to go to? This could be because you have many tabs with Torn open on your browser.

    He doesn't address your userscript: look at his recent forum posts: http://www.torn.com/forums.php#/p=search&q=900534&f=0&y=0

    Last edited by Vinkuun on 09:58:53 - 27/07/14
  • RR Aristotle [1481808]Aristotle [1481808]
    • Aristotle [1481808]
    • Status: Civilian
    • Level: 60
    • Posts: 347
    • Karma: 22
    • Last Action: 1 hours
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 13:14:44 - 27/07/14 (4 month ago)
    Works like a charm on both browsers. Thanks again!
  •   Chedburn [1]Chedburn [1]
    • Chedburn [1]
    • Status: Admin
    • Level: 39
    • Posts: 8702
    • Karma: 1115
    • Last Action: 1 hours
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 12:58:06 - 28/07/14 (4 month ago)
    Excellent idea. We'll look at adding something like this properly in the future.
  • ~SA~ Stylin [1474127]Stylin [1474127]
    • Stylin [1474127]
    • Status: Civilian
    • Level: 100
    • Posts: 6473
    • Karma: 438
    • Last Action: 1 hours
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 15:01:18 - 28/07/14 (4 month ago)
    Awesome script, been wanting something like this for long time :) great for traders
    cheers
    rated +++++
    Buying Cesium 150m each.
  • TUS Lampy [897954]Lampy [897954]
    • Lampy [897954]
    • Status: Civilian
    • Level: 69
    • Posts: 2672
    • Karma: 41
    • Last Action: 7 days
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 17:27:07 - 28/07/14 (4 month ago)
    Looks good :D

    I famous on the screenshot!
  • RR Xiphias [187717]Xiphias [187717]
    • Xiphias [187717]
    • Status: Civilian
    • Level: 45
    • Posts: 306
    • Karma: 71
    • Last Action: Now
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 22:27:58 - 29/07/14 (4 month ago)
    Made a quick fix for a layout bug that appeared on Firefox today. Chrome looked fine though. Should be good for now.
  • NuBz keroo [1787856]keroo [1787856]
    • keroo [1787856]
    • Status: Civilian
    • Level: 18
    • Posts: 844
    • Karma: 77
    • Last Action: 6 minutes
    • Quote
    • Report
    • 0
    • Reason:
      Are you sure you want to report this post to staff?
      REPORT Cancel
    • You have rated this post. Rating limit has been reached.
    Posted to on 22:38:45 - 30/07/14 (4 month ago)
    yay