Welcome to our Community
Wanting to join the rest of our members? Feel free to sign up today.
Sign up

Biete Seltenheits- bzw. Qualitätsgrade für Downloads

Kirdock

Otaku Experte
29 Juli 2013
56
45
33
28
Kärnten
Hätte so nebenbei ein Skript für Tampermonkey geschrieben, welches den Downloads Qualitätsgrade zuweist.

Schrift:
  • rot: wenn WebRip
  • grün: wenn HDTV bzw. nicht BluRay und nicht WebRip
  • orange: wenn BluRay und 1080p
  • blau: wenn BluRay und nicht 1080p
  • + Glitzer im Hintergrund: Wenn abgeschlossen (also nicht "laufend")
Vorschau:
db30fb1087.png


Hier das Skript:
Code:
// ==UserScript==
// @name         Mark rarity
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.animes.so/forum/serien-gersub.349/*
// @match        https://www.animes.so/forum/serien-gerdub.348/*
// @match        https://www.animes.so/forum/filme-gersub-dub.350/*
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
    $('.PreviewTooltip').each(function(){
        const text = $(this).text().toLowerCase().replace(/ /g,''); //because sometimes the title is "abc[BluRa y]def"
        $(this).css({
            'color' : text.indexOf('webrip') >= 0 ? 'red': text.indexOf('bluray') >= 0 ? (text.indexOf('1080') < 0 ? '#00bae9' : '#e95a00') : 'green',
            'background-image': text.indexOf('laufend') < 0 ? 'url(https://www.animes.so/images/glow.gif)' : undefined
        });
    });
})();
 
Zuletzt bearbeitet:

YuSmart

Otaku Experte
22 Dez. 2018
54
24
8
Sehr nice! Habe mir allerdings erlaubt, die Farben zu ändern, damit sie in meinem Kopf für meine persönlichen Präferenzen Sinn ergeben :D

  • Rot: wenn HDTV bzw. nicht BluRay und nicht WebRip
  • Orange: wenn WebRip
  • Dunkelgrün: wenn BluRay und nicht 1080p
  • Hellgrün: wenn BluRay und 1080p
  • + Glitzer im Hintergrund: Wenn abgeschlossen (also nicht "laufend")
UyQ4w5s.png
 

Kirdock

Otaku Experte
29 Juli 2013
56
45
33
28
Kärnten
Update für die neue Website:
Javascript:
// ==UserScript==
// @name         Mark rarity
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       Kirdock
// @match        https://www.animes.so/forum/anime-deutsch-sub/*
// @match        https://www.animes.so/forum/anime-deutsch/*
// @match        https://www.animes.so/forum/anime-filme/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const colors = {
        blurayFullHD: '#e95a00',
        blurayHD: '#00bae9',
        webrip: 'red',
        default: 'green'
    };
    const webRip = ['webrip', 'web-dl', 'webdl'];
    const bluRay = ['bdrip', 'bluray'];
    for (const element of document.querySelectorAll('.js-threadList .structItem-cell--main .structItem-title a:not(.labelLink)')){
        const text = element.innerText.toLowerCase().replace(/ /g,''); //because sometimes the title is "abc[BluRa y]def"

        element.style.color = getColor(text);
        element.style.backgroundImage = text.includes('laufend') ? undefined : 'url(https://www.animes.so/images/glow.gif)';
    };


    function getColor(text /*:string*/) /*:string*/ {
        if (webRip.some(t => text.includes(t))) {
            return colors.webrip;
        }

        if(!bluRay.some(t => text.includes(t))) {
            return colors.default;
        }

        if (text.includes('1080')) {
            return colors.blurayFullHD;
        }

        return colors.blurayHD;
    }
})();
 
  • Like
Reaktionen: Azugo

Kirdock

Otaku Experte
29 Juli 2013
56
45
33
28
Kärnten
Achja gab ja mal wieder ein kleines Update bei der Seite.

Hier die Anpassung
Javascript:
// ==UserScript==
// @name         Mark quality
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  try to take over the world!
// @author       Kirdock
// @match        https://www.animes.so/forum/anime-deutsch-sub/*
// @match        https://www.animes.so/forum/anime-deutsch/*
// @match        https://www.animes.so/forum/anime-filme/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const colors = {
        blurayFullHD: '#e95a00',
        blurayHD: '#00bae9',
        webrip: 'red',
        default: 'green'
    };
    const webRip = ['webrip', 'web-dl', 'webdl'];
    const bluRay = ['bdrip', 'bluray'];
    for (const element of document.querySelectorAll('.js-threadList .aso_thread--title--title')){
        const text = element.innerText.toLowerCase().replace(/ /g,''); //because sometimes the title is "abc[BluRa y]def"

        element.style.color = getColor(text);
        if(!text.includes('laufend')) {
           element.style.backgroundImage = 'url(https://cdn.animes.so/styles/animesso/premium/glow.gif)';
        }
    };


    function getColor(text /*:string*/) /*:string*/ {
        if (webRip.some(t => text.includes(t))) {
            return colors.webrip;
        }

        if(!bluRay.some(t => text.includes(t))) {
            return colors.default;
        }

        if (text.includes('1080')) {
            return colors.blurayFullHD;
        }

        return colors.blurayHD;
    }
})();

Vorschau:
1684366047066.png



Hätte auch noch ein Skript für eine bessere Sichtbarkeit von "gelesen" Beiträgen
Javascript:
// ==UserScript==
// @name         mark-as-read-visualization
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       Kirdock
// @match        https://www.animes.so/forum/anime-deutsch-sub/*
// @match        https://www.animes.so/forum/anime-deutsch/*
// @match        https://www.animes.so/forum/anime-filme/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    document.querySelectorAll('.structItemContainer-group.js-threadList>div:not(.is-unread)').forEach(element => {
        element.setAttribute('style', 'background-color: #0c0b0b !important');
    })
})();
 
  • Like
Reaktionen: Virgel