Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
"Star Wars: The Last Jedi Discussion (WARNING: SPOILERS EVERYWHERE)"
 
It’s just a normal forum thread though. I’m not sure how the forum software would know it should block posts from that thread. You can block whole forums from appearing in your settings but I don’t think it’s possible to block individual threads.
 
Either it should be possible to mark a thread as "spoiler" with the software handling it, or better, you could create a media content (movies, series, books) subforum whose threads are all handled in this way.
 
No, I am talking about threads where only the title would appear in Forum Spy.
 
But that doesn't give away (spoil) anything, right?
If only the title was shown, it would not spoil anything and you would be aware about conversations in which you chose to participate.
 
I hardly think 1 line of text under a title does that, especially if the title has SPOILER in bold letters
But that's just me I guess
Yes, it is just you. One line of text could contain essential info.
 
If only the title was shown, it would not spoil anything and you would be aware about conversations in which you chose to participate.
So is the suggestion then that the spy only shows the title?
 
Yes, for such threads.
If you are using a desktop browser you can install the Tampermonkey plugin (http://tampermonkey.net). Then add the userscript below, by following the documentation on the site if needed.

The script runs only on the Spy page. It will hide the message snippet of threads with the word "spoiler" in the title, but leave the title of the thread showing. This will affect other meanings of the word spoiler also if they are in the thread title.

Code:
// ==UserScript==
// @name         MacRumors - No Spoilers in Spy
// @namespace    mr.ShinyDren
// @version      0.2.1
// @description  Hide snippets of posts on the Spy page if thread title contains the word "Spoiler".
// @author       ShinyDren
// @match        https://forums.macrumors.com/spy/
// @match        https://forums.macrumors.com/spy/
// @grant        none
// ==/UserScript==

var checkRegex = /spoiler/i;

function checkTitles() { // Called once at page load.
    var threadTitles = document.querySelectorAll(".discussionListItem .info div.whoWhere a"); // Get all matches already loaded.
    for (i = 0; i < threadTitles.length; i++) {
        if (checkRegex.test(threadTitles[i].innerHTML)) { // Contains the text.
            // threadTitles[i].style.color = "orange"; // Change text color.
            threadTitles[i].nextSibling.style.display = "none"; // Hide the snippet.
        }
    }
}

setTimeout(checkTitles, 1000); // Runs once on page load (with 1 second delay) to take care of any existing items (needed if using one of the spy modification scripts by user "sammich" ).

function checkTitle() {
    var threadTitle = document.querySelector(".discussionListItem .info div.whoWhere a"); // Items are added one at a time, so it is quicker to only grab the first match.
    if (checkRegex.test(threadTitle.innerHTML)) { // Contains the text.
        // threadTitle.style.color = "orange"; // Change text color.
        threadTitle.nextSibling.style.display = "none"; // Hide the snippet.
    }
}

var targetNode = document.querySelector('#spyContents.discussionList ol.discussionListItems'); // Select the node that will be observed for mutations
var config = { childList: true, subtree: true }; // Options for the observer (which mutations to observe)

// Callback function to execute when mutations are observed
var callback = function(mutationsList) {
    checkTitle();
};

var observer = new MutationObserver(callback); // Create an observer instance linked to the callback function

observer.observe(targetNode, config); // Start observing the target node for configured mutations

Have fun.
Edit: Changed the delay to a full second for first run, previously sometimes started too quick and missed items.
 
Last edited:
  • Like
Reactions: Weaselboy
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.