Greasy Fork

AO3 fandom highlighter config

Config script for AO3 fandom highlighter

目前为 2021-04-17 提交的版本。查看 最新版本

// ==UserScript==
// @name         AO3 fandom highlighter config
// @namespace    ao3
// @version      1.0
// @description  Config script for AO3 fandom highlighter
// @author       CertifiedDiplodocus
// @require      http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
// @match        http*://archiveofourown.org/users/*
// @exclude      http*://archiveofourown.org/users/CertifiedDiplodocus/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

/* jshint esversion:6 */ //          allows "let"

(function() {
    'use strict';

    window.fandomHighlighterConfig = {

        /******************************** CONFIG **********************************/
        // Edit this file with your own settings, then make sure both it and the  //
        // highlight fandoms' script are enabled in Greasemonkey/Tampermonkey.    //
        // When the script updates, your configuration will remain intact.        //
        /**************************************************************************/

        // Fill in your own username in the @exclude line above
        // to avoid lighting up your own dashboard.

        // Favourite fandoms list (regexp can be used - see below for tips)
        fandomsToHighlight: ["Original Work", "Critical Role", "Harry Potter", "Naruto", "Scooby Doo",
                             "Holmes", "^Avatar:", "The Avengers .Marvel"],

        // DELETE ME, I AM AN EXAMPLE (and will override your own settings)
        fandomsToHighlight: ["Original Work",
                             "Alice in Wonderland .2010.", "All Creatures Great and Small", "Attack on Titan",
                             "^Avatar:", "Black Books", "Blake's 7", "Broadchurch", "Buffy the Vampire Slayer",
                             "Cabin Pressure", "Cinderbrush", "Colbert", "Critical Role",
                             "Daily Show", "Discworld", "Dishonored .Video Games.", "Doctor Who", "Dresden Files",
                             "Fake News", "Firefly", "Fullmetal Alchemist", "Good Omens", "Gravity Falls", "Harry Potter", "Hornblower", "House M\.D\.",
                             "Indiana Jones", "Jonathan Strange & Mr Norrell", "Kung Fu Panda", "Life On Mars",
                             "MASH", "Mob Psycho 100", "Monty Python's Flying Circus", "Mushishi", "My Hero Academia",
                             "Marvel Cinematic Universe", "^Marvel$", //                             **MCU**
                             "The Avengers .Marvel", "The Avengers - Ambiguous", //                  **MCU**
                             "^Captain America", "Guardians of the Galaxy", "^Iron Man .Movies.", // **MCU**
                             "^Thor .Movies.", "^Doctor Strange", "^Captain Marvel", //              **MCU**
                             "Naruto", "One-Punch Man", "Pirates of the Caribbean", "Pokemon - All Media Types", "Pokemon .Anime.",
                             "Red Dwarf", "Rick and Morty", "Sagas of Sundry: Dread",
                             "Scoob and Shag", "Scooby.Doo", "Sherlock", "Sleepy Hollow", "Spider-Man: Into the Spider-Verse",
                             "^Star Trek$", "Star Trek: Alternate Original Series", "Star Trek: The Next Generation", "Star Trek: The Original Series",
                             "Star Wars", "Steven Universe", "Stranger Things", "Swallows and Amazons",
                             "Team Fortress 2", "The Brittas Empire", "The Magnus Archives", "The Thick of It",
                             "The Umbrella Academy", "The X-Files", "Tintin", "Welcome to Night Vale"],

        // Fandoms to highlight in a different colour (specify colour for each).
        //    - overrides the default colour
        //    - you can add fandoms here without removing them from the first list

        fandomsInColour: {"Die Hard":"#fda7d1", //    pink
                          "Scooby Doo":"#adf7d1", //  light green
                          "^Putin RPF":"red", //      regexp patterns can be used
                          "Naruto": "orange", // named colors work too
                         },

        // SOME NOTES ON REGEXP AND SEARCH RESULTS *******************************/

        // By default, the search matches any string containing the search text:
        //     "Sherlock" matches "Sherlock (TV)", "Sherlock Holmes" and "Young Sherlock Holmes"
        // For more control, use the regex symbols "^" (string start) and/or "$" (string end):
        //     "^Sherlock" matches "Sherlock Holmes" but not "Young Sherlock Holmes"
        //     "^Star Trek$" matches only "Star Trek", not "Star Trek: The Original Series" or "Star Trek: Picard"
        // "." matches any character:
        //     "."

        // SPECIAL CHARACTERS: If a fandom contains any of the following characters
        // . + * ? ^ $ { } | \
        // they must be preceded (escaped) with a backslash (e.g. "House M\.D\.")
        // for the script to work.
        // ( ) and [ ]
        // must be escaped with a double backslash: "Thor \\(Marvel\\)"
        // ...Or just use a period, which matches any character: "Thor .Marvel."

        // FORMAT: enable/disable bold text, highlighting, and custom highlighting
        boldIsOn: true,
        highlightIsOn: true,
        customHighlightIsOn: true,

        highlightDefaultCol: 'LightYellow', // default highlight colour

        //https://www.w3schools.com/colors/colors_names.asp
    }

})();