Greasy Fork 还支持 简体中文。

Hide Irrelevant Videos

Removes other languages so the view is more clean

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey to install this script.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Hide Irrelevant Videos
// @description  Removes other languages so the view is more clean
// @namespace    http://theanykey.se
// @include      https://www.jw.org/apps*
// @include      *jw.org/apps*
// @version      1.0
// ==/UserScript==

// Setup
ShowVideosInLanguage="Svenska"

// Check for Play buttons and remove them
var p = document.getElementsByClassName('aVideoURL');
//var cstr = "container-fluid-header";
for (var i=p.length; --i>=0;) 
{
    var n = p[i];
    //while(n.className.split(" ").indexOf(cstr)==-1) {
    //    n = n.parentNode;
    //}
    if (n)
    {
    	n.parentNode.removeChild(n);
    }
}

// Check for Text buttons and remove them (except swedish)
var p = document.getElementsByClassName('linkDnld');
var cstr = ShowVideosInLanguage;
for (var i=p.length; --i>=0;) 
{
    var n = p[i];
    if (n.innerHTML.indexOf(cstr)==-1) {
        if (n)
        {
            n.parentNode.removeChild(n);
        }      
    }
    else
    {
        if (n)
        {
            //n.setAttribute("download","MyFile.mp4");
        }
    }
}

// Remove for BR
var p = document.getElementsByTagName('BR');
for (var i=p.length; --i>=0;) 
{
    var n = p[i];
    if (n)
    {
        n.parentNode.removeChild(n);
    }      
}

// Remove long lines in <p>
var p = document.getElementsByTagName('P');
var cstr = "-----------------------------------------------------";
for (var i=p.length; --i>=0;) 
{
    var n = p[i];
    if (n.innerHTML.indexOf(cstr)!=-1) {
        if (n)
        {
            n.parentNode.removeChild(n);
        }      
    }
}

// Remove dead links
var p = document.getElementsByClassName('deadlinks');
//var cstr = "container-fluid-header";
for (var i=p.length; --i>=0;) 
{
    var n = p[i];
    //while(n.className.split(" ").indexOf(cstr)==-1) {
    //    n = n.parentNode;
    //}
    if (n)
    {
    	n.parentNode.removeChild(n);
    }
}