New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

Oculus Forum Tool

kojackkojack Posts: 6,967 Volunteer Moderator
edited January 2019 in General
Inspired by a post by @YoLolo69, I've created a little tool to make forum use a little nicer, without needing Cyber to hack around in the server code and with us able to customise.

Oculus Forum Tool is a script for either Grease Monkey (Firefox) or Tamper Monkey (Chrome) that adds colour coding to posts on this forum.
https://github.com/rajetic/oculusforumtool

Currently it recognises and colour codes as follows:
Oculus staff - blue.
Volunteer moderators - orange.
Your own posts - cyan.
Banned users - yellow.
Everybody else - normal black.
(Note: the "your own posts" takes precedence, so an oculus staff member will see their own posts in cyan, not staff blue)

On the subject list, it colours the subject text.
Within a thread, it colours the box at the top of a post and the border around the post (not the post's text).

Here's some examples:






At the moment there's no easy user customisation interface. I may add that, but I really hate javascript programming (but I love the idea of messing with websites to make them behave how I want).
But you can edit the colours used in the script itself, they are all defined near the top.

Another possible enhancement (don't hold your breath) is custom behaviour based on user name. Currently it's all based on class data the forum exposes, I don't need to deal with names. But if I did, it would let you flag specific people you want coloured.


Feel free to read the source before installing. It's pretty small. All it does is look for certain LI or DIV tags and change their style setting on your local system. These scripts can also do some pretty evil things, so it's best to always be wary.

Other browser support? Maybe, if they have some equivalent to greasemonkey. I tried Opera scripting in the past, it annoyed me so I quit.


How to install:
Firefox
- Install Grease Monkey. https://addons.mozilla.org/en-US/firefox/addon/greasemonkey
- You should be able to drag & drop the script file onto Firefox and it will ask to install.
Chrome
- Install Tamper Monkey. https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en
- This was trickier. It seems TM won't install scripts unless they come from the chrome store or you made them yourself. So I told it to make a new script then copy/pasted the code over the top.




Author: Oculus Monitor,  Auto Oculus Touch,  Oculus Forum Tool,  Phantom Touch Remover,  Forum Dark Mode,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: DK1, DK2, CV1, Rift-S, GearVR, Go, Quest

Comments

  • maxpare79maxpare79 Posts: 1,792
    Project 2501
    edited January 2017
    NIce work @kojack

    I am on chrome, copied and paste your script in a new script in TM, but even if the script is running it doesn't change my forum appearance.
    I am a spacesim/flightsim/racesim enthusiast first :-) I9 [email protected], 32gb RAM/ 2080ti Former DK2, Gear VR,CV1 and Rift S owner
  • kojackkojack Posts: 6,967 Volunteer Moderator
    edited January 2017
    Hmm, what's the url you are using to view the forum?
    The script is set up to work with any url matching https://forums.oculus.com/*

    If the url is fine and Tampermonkey says the script is running, could you grab a copy of the page source for this thread (it has two people who should have colours applied) and send it to me? Maybe some forum setting is different for you and the layout doesn't exactly match what I've based this on.


    Edit: one thing to note, the colours won't apply when a new post is made. You need to refresh the window. The submit button modifies the page instead of reloading and my script only runs once during page load.

    Author: Oculus Monitor,  Auto Oculus Touch,  Oculus Forum Tool,  Phantom Touch Remover,  Forum Dark Mode,  X-Plane Fixer
    Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
    Headsets: DK1, DK2, CV1, Rift-S, GearVR, Go, Quest
  • CrashFuCrashFu Posts: 1,756 Valuable Player
    edited January 2017
    *follows directions*

    Hey, it works, I think.  Color-coding achieved!

    Curiously enough, your OP in this thread is showing up as the default black, but the post you (and max) made after that DO show up in the orange.

    P.S.  And when I first posted THIS post, it showed up as black until I refreshed the page, after which it became blue.
    It's hard being the voice of reason when you're surrounded by unreasonable people.
  • kojackkojack Posts: 6,967 Volunteer Moderator
    Good point, the op colouring isn't working. It was working at one point. Back to testing. :)

    Threads you made yourself currently can't have your opening post coloured because the forum doesn't mark them with the correct class code, I'd have to get the user name and test for that. But it should spot others like mods/admins/banned for op posts (but is broken as you pointed out).

    Op posts and replies use different layouts and need explicit code, even though they look identical.


    Author: Oculus Monitor,  Auto Oculus Touch,  Oculus Forum Tool,  Phantom Touch Remover,  Forum Dark Mode,  X-Plane Fixer
    Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
    Headsets: DK1, DK2, CV1, Rift-S, GearVR, Go, Quest
  • kojackkojack Posts: 6,967 Volunteer Moderator
    Fixed the opening post issue. I had refactored my colour code, but only did it completely for the replies and subject list, the op post code was half old and half new.
    I think the page I was testing on was really page 2 with my post at the top, not page 1, so it looked like it was working. :)

    Author: Oculus Monitor,  Auto Oculus Touch,  Oculus Forum Tool,  Phantom Touch Remover,  Forum Dark Mode,  X-Plane Fixer
    Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
    Headsets: DK1, DK2, CV1, Rift-S, GearVR, Go, Quest
  • vannagirlvannagirl Posts: 2,020 Valuable Player
    wow

    a great idea, ty

    also
    Banned users = Pink
    I see what you did there :#
    Look, man. I only need to know one thing: where they are. 
  • YoLolo69YoLolo69 Posts: 1,145
    Wintermute
    Wow+1!

    Just tested it, that's pretty good, work perfectly (Firefox here), thanks a bunch Kojack! :)

    “Dreams feel real while we are in them, it's only when we wake up that we realize something was strange.” - Dom Cobb

    "Be careful, if you are killed in real life you die in VR too." - TD_4242

    I7 10700K,  GTX1080 OC 10%, 32GB DDR4 3200Mhz, Oculus Rift CV1

  • kojackkojack Posts: 6,967 Volunteer Moderator
    Just tested, it works in Vivaldi and Edge too.
    Vivaldi can use chrome extentions, so just install Tampermonkey.
    Edge has a port of Tampermonkey too, use the Edge extentions panel to search for it.



    Author: Oculus Monitor,  Auto Oculus Touch,  Oculus Forum Tool,  Phantom Touch Remover,  Forum Dark Mode,  X-Plane Fixer
    Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
    Headsets: DK1, DK2, CV1, Rift-S, GearVR, Go, Quest
  • maxpare79maxpare79 Posts: 1,792
    Project 2501
    I am on the road today @kojack I will get back to you tonight 
    I am a spacesim/flightsim/racesim enthusiast first :-) I9 [email protected], 32gb RAM/ 2080ti Former DK2, Gear VR,CV1 and Rift S owner
  • kojackkojack Posts: 6,967 Volunteer Moderator
    edited April 2018
    Yay, an update!
    Oculus moved their forum from oculus.com to oculusvr.com a while ago, which broken this script. Fixed now.

    There's a few changes:
    - I've made emojis smaller. The html wants them to be 20 pixels, which looks good. But the style was making them 40px. This script will force them to 20. Now they don't make text formatting look crap.
    - In the thread list, each thread actually has a date/time of the last reply, but it's hidden. I've unhidden it.
    - Also in the thread list, I've right aligned some of the data (reply date, user and category). It looks a bit neater, especially the category box.
    -Changed banned users to yellow. This makes their post still obvious, while blending into the background more.

    There's still one annoyance that I will fix at some point: the way it's detecting your own posts doesn't work on the opening post of a thread. It works on the thread list and on reply posts. So if you visit a thread you made, the top post won't be blue. Normal users will see black and mods will see orange.
    I can fix it, but I only have the enthusiasm for one attempt at javascript per year.

    Another minor thing: when you post a reply, the script doesn't get to run again, so the colours and emoji size won't be fixed for that post until you refresh the page.


    Normal forum behaviour:


    New behaviour:



    I haven't tested in chrome yet, just firefox.
    Author: Oculus Monitor,  Auto Oculus Touch,  Oculus Forum Tool,  Phantom Touch Remover,  Forum Dark Mode,  X-Plane Fixer
    Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
    Headsets: DK1, DK2, CV1, Rift-S, GearVR, Go, Quest
  • MrDood12MrDood12 Posts: 46
    Brain Burst
    i can confirm it works on chrome! thanks man!
  • snowdogsnowdog Posts: 8,015 Valuable Player
    There are enough tools on this forum as it is, why do we want to add another one? :o:p:D
    "This you have to understand. There's only one way to hurt a man who's lost everything. Give him back something broken."

    Thomas Covenant, Unbeliever
  • MradrMradr Posts: 4,178 Valuable Player
    edited April 2018
    Would I be considered a normal user:)? What about Zen xD? I'm just joking good work man!!
  • snowdogsnowdog Posts: 8,015 Valuable Player
    Well I'm not a normal user, I'm Special. My Mum told me I went to a Special School and everything. :)
    "This you have to understand. There's only one way to hurt a man who's lost everything. Give him back something broken."

    Thomas Covenant, Unbeliever
  • PIXELATEDPIXELATED Posts: 242
    Nexus 6
    Works here on Chrome on my Mac  o:)

    Excellent
    Win 10 Pro, GTX 1080, Asus Z170 Deluxe, Nvidia 391.35
  • kojackkojack Posts: 6,967 Volunteer Moderator
    Mradr said:
    Would I be considered a normal user:)? What about Zen xD? I'm just joking good work man!!
    You and Zen are definitely not normal users. :)

    Author: Oculus Monitor,  Auto Oculus Touch,  Oculus Forum Tool,  Phantom Touch Remover,  Forum Dark Mode,  X-Plane Fixer
    Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
    Headsets: DK1, DK2, CV1, Rift-S, GearVR, Go, Quest
Sign In or Register to comment.