Greasy Fork is available in English.
Feel some of the benefits of Private trackers.
当前为
// ==UserScript==
// @name Quality filters - torrentgalaxy.to
// @namespace Violentmonkey Scripts
// @match https://torrentgalaxy.to/*
// @grant GM_addStyle
// @version 0.11
// @run-at document-end
// @author webdevz.sk
// @description Feel some of the benefits of Private trackers.
// @license MIT
// ==/UserScript==
// Scene release*: Orange background
// High Quality Encoders*: Yellow background
// Micro encoders*: Hidden
// XXX uploaders: Hidden
// In search result, torrents under some categories have been hidden as well.
// // Blocked Categories
// // SD
// // Episodes SD
// // XXX
// // CAM/TS
// // XXX - SD
// *Scene: Source WEB-DL uploads. But renames to WEBRip for some reason.
// *High Quality Encoders: Rips in almost close to Blu-ray/WEB-DL source.
// *Micro encoders: Very tiny file size which greatly impacts quality.
// Why function? So that the block can be folded ;)
// Why not JS? With JS I would have to take page-load, async functions into account.
// Why not on Firefox Firefox doesn't support modern CSS selectors yet. Tell them to upgrade.
// Torrent links ENDING with these strings
// TGx] translates to TGx- in their urls
const scene = [
'TGx-',
'FLUX',
'CMRG',
'Ntb',
]
// Torrent links ENDING with these strings
const quality = [
'QxR-',
'FGT',
'FraMeSToR',
'Prof-',
'Vyndros-'
]
// uploader profile href="/profile/EACH_STRING"
const blocked = [
'TheDarkRider',
'GalaxyRG',
'Pornbits',
'NoisyBoY',
'sbudennogo',
'GalaXXXy',
'Pornlake',
]
const blockedCategory = {
'Movies - SD' : 1,
'TV - Episodes SD' : 5,
'XXX - Misc' : 47,
'XXX - HD' : 35,
'XXX - 4K UHD' : 48,
'Movies - CAM/TS' : 45,
'XXX - SD' : 34
}
const sceneTemplates = (() => (
scene.map(x => (
`[href$="${x}"]`
))
))()
const qualityTemplates = (() => (
quality.map(x => (
`[href$="${x}"]`
))
))()
const blockedTemplates = (() => (
blocked.map(x => (
`[href="/profile/${x}"]`
))
))()
const categoryTemplates = (() => (
Object.values(blockedCategory).map(cat => (
`[href="/torrents.php?cat=${cat}"]`
))
))()
function css(){
return `
/*----------------------- Scene -----------------------*/
.tgxtable .tgxtablerow:has( :is(${ sceneTemplates })){
background: #ffd700;
color: #1b1b1b;
}
.tgxtable .tgxtablerow:has( :is(${ sceneTemplates })) .tgxtablecell{
border-bottom: 1px solid #333;
}
.tgxtable .tgxtablerow:has( :is(${ sceneTemplates })) a:not([title="comments"]){
color: #1b1b1b;
text-shadow: none;
}
/*----------------------- Quality Rippers -----------------------*/
.tgxtable .tgxtablerow:has( :is(${ qualityTemplates })){
background: #f2970e;
color: #1b1b1b;
}
.tgxtable .tgxtablerow:has( :is(${ qualityTemplates })) .tgxtablecell{
border-bottom: 1px solid #333;
}
.tgxtable .tgxtablerow:has( :is(${ qualityTemplates })) a:not([title="comments"]){
color: #1b1b1b;
text-shadow: none;
}
/*----------------------- Blocked -----------------------*/
.tgxtable .tgxtablerow:has( :is(${ blockedTemplates })){
display: none;
}
/*----------------------- Block by Category -----------------------*/
.tgxtable .tgxtablerow:has( :is(${ categoryTemplates })){
display: none;
}
`
}
if (typeof GM_addStyle !== "undefined") {
GM_addStyle(css())
console.log('CSS Injection method: GM_addStyle')
} else {
let styleNode = document.createElement("style")
styleNode.id = 'InjectedStyle'
styleNode.appendChild(document.createTextNode(css()))
;(document.querySelector("head") || document.documentElement).appendChild(styleNode)
console.log('CSS Injection method: document.appendChild')
}