Раздел Новости

Обновление скрипта

Обновил скрипт, который блокирует рекламу на DZEN.ru. Скачать новую версию можно с GitHub https://github.com/VVSite/block-ads-dzen-video

На рутированном Pad 5 отваливается WiFi

Решение проблемы отваливающегося WiFi на планшете Pad 5. (у планшета разблокирован загрузчик и установлен root):

1. Установите из магазина Google Play программу termux .

2. Запустите termux и выполните последовательно три команды:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
su
settings put global captive_portal_server 127.0.0.1 && settings put global captive_portal_detection_enabled 0
settings put global captive_portal_mode 0
su settings put global captive_portal_server 127.0.0.1 && settings put global captive_portal_detection_enabled 0 settings put global captive_portal_mode 0
su

settings put global captive_portal_server 127.0.0.1 && settings put global captive_portal_detection_enabled 0 

settings put global captive_portal_mode 0

 

Скрипт tampermonkey для блокировки нежелательных каналов в Youtube

Это скрипт блокирует каналы в списках выдачи и поиска на Youtube. Скопируйте название канала, как на рисунке.

Затем нажимаете кнопку слева в верхнем углу и через запятую введите названия каналов без https://www.youtube.com. После этого закрываете список, нажав на кнопку с крестиком.

Для проверки работы скрипта введите нужный поиск каналов и проверьте как срипт удалит каналы из списка поиска или выдачи.

Установка производится так же, как и другие скрипты tampermonkey. Пример описан здесь.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
// ==UserScript==
// @name Block Youtube channels
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Block Youtube channels
// @author VVSite
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?domain=youtube.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
var clDiv = document.createElement('div');
clDiv.style.cssText = 'z-index: 30000; font-family: verdana, serif; background: #000; border: 1px solid red; position: fixed; top: 0px; left: -310px;';
clDiv.innerHTML = '<input type=text class="cl-text" placeholder="Список каналов через ," style="padding: 3px; width: 300px; font-weight: bold; border: 0px;"><button class="cl-but" style="color: red;">❌</button>';
document.body.appendChild(clDiv);
var clb = clDiv.querySelector('.cl-but');
var clt = clDiv.querySelector('.cl-text');
var yicl = [];
function lc()
{
var coo = getCookie('clist');
clt.value = coo;
if (coo)
{
coo = coo.replace(/[\s]{1,3}/g, '');
yicl = coo.split(',');
}
}
lc();
// var yicl = ['HESUSDED', 'uglytwoi'];
if (clb)
{
clb.onclick = (e)=>{
//e.preventDefault();
e.stopPropagation();
clDiv.style.left = (clDiv.style.left == '0px' ? '-310px' : '0px');
console.log(clt.value);
setCookie('clist', clt.value, 365);
lc();
return false;
};
}
//
// Set a Cookie
function setCookie(cName, cValue, expDays) {
let date = new Date();
date.setTime(date.getTime() + (expDays * 24 * 60 * 60 * 1000));
const expires = "expires=" + date.toUTCString();
document.cookie = cName + "=" + cValue + "; " + expires + "; path=/";
}
// Get a Cookie
function getCookie(cName) {
const name = cName + "=";
const cDecoded = decodeURIComponent(document.cookie); //to be careful
const cArr = cDecoded .split('; ');
let res;
cArr.forEach(val => {
if (val.indexOf(name) === 0) res = val.substring(name.length);
})
return res;
}
//
// Fullscreen mode && iframe
function cfs()
{
clDiv.style.display = ((!window.screenTop && !window.screenY) || (window!=window.top) ? 'none' : 'block');
}
// start
var fc = setInterval(function(e){
cfs();
// console.log(yicl);
var clsbl = ['ytd-rich-item-renderer', 'ytd-video-renderer'];
yicl.forEach(function(v, i, e){
var lnk = document.querySelectorAll('a[href="' + v + '"]');
if (lnk[0])
{
clsbl.forEach(function(v_bl){
var bl1 = lnk[0].closest(v_bl);
if (bl1) bl1.remove();
});
}
});
}, 200);
})();
// ==UserScript== // @name Block Youtube channels // @namespace http://tampermonkey.net/ // @version 0.4 // @description Block Youtube channels // @author VVSite // @match https://www.youtube.com/* // @icon https://www.google.com/s2/favicons?domain=youtube.com // @grant none // ==/UserScript== (function() { 'use strict'; var clDiv = document.createElement('div'); clDiv.style.cssText = 'z-index: 30000; font-family: verdana, serif; background: #000; border: 1px solid red; position: fixed; top: 0px; left: -310px;'; clDiv.innerHTML = '<input type=text class="cl-text" placeholder="Список каналов через ," style="padding: 3px; width: 300px; font-weight: bold; border: 0px;"><button class="cl-but" style="color: red;">❌</button>'; document.body.appendChild(clDiv); var clb = clDiv.querySelector('.cl-but'); var clt = clDiv.querySelector('.cl-text'); var yicl = []; function lc() { var coo = getCookie('clist'); clt.value = coo; if (coo) { coo = coo.replace(/[\s]{1,3}/g, ''); yicl = coo.split(','); } } lc(); // var yicl = ['HESUSDED', 'uglytwoi']; if (clb) { clb.onclick = (e)=>{ //e.preventDefault(); e.stopPropagation(); clDiv.style.left = (clDiv.style.left == '0px' ? '-310px' : '0px'); console.log(clt.value); setCookie('clist', clt.value, 365); lc(); return false; }; } // // Set a Cookie function setCookie(cName, cValue, expDays) { let date = new Date(); date.setTime(date.getTime() + (expDays * 24 * 60 * 60 * 1000)); const expires = "expires=" + date.toUTCString(); document.cookie = cName + "=" + cValue + "; " + expires + "; path=/"; } // Get a Cookie function getCookie(cName) { const name = cName + "="; const cDecoded = decodeURIComponent(document.cookie); //to be careful const cArr = cDecoded .split('; '); let res; cArr.forEach(val => { if (val.indexOf(name) === 0) res = val.substring(name.length); }) return res; } // // Fullscreen mode && iframe function cfs() { clDiv.style.display = ((!window.screenTop && !window.screenY) || (window!=window.top) ? 'none' : 'block'); } // start var fc = setInterval(function(e){ cfs(); // console.log(yicl); var clsbl = ['ytd-rich-item-renderer', 'ytd-video-renderer']; yicl.forEach(function(v, i, e){ var lnk = document.querySelectorAll('a[href="' + v + '"]'); if (lnk[0]) { clsbl.forEach(function(v_bl){ var bl1 = lnk[0].closest(v_bl); if (bl1) bl1.remove(); }); } }); }, 200); })();
// ==UserScript==
// @name         Block Youtube channels
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  Block Youtube channels
// @author       VVSite
// @match        https://www.youtube.com/*
// @icon         https://www.google.com/s2/favicons?domain=youtube.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var clDiv = document.createElement('div');
    clDiv.style.cssText = 'z-index: 30000; font-family: verdana, serif; background: #000; border: 1px solid red; position: fixed; top: 0px; left: -310px;';
    clDiv.innerHTML = '<input type=text class="cl-text" placeholder="Список каналов через ," style="padding: 3px; width: 300px; font-weight: bold; border: 0px;"><button class="cl-but" style="color: red;">❌</button>';

    document.body.appendChild(clDiv);
    var clb = clDiv.querySelector('.cl-but');
    var clt = clDiv.querySelector('.cl-text');

    var yicl = [];

    function lc()
    {
        var coo = getCookie('clist');
        clt.value = coo;
        if (coo)
        {
            coo = coo.replace(/[\s]{1,3}/g, '');
            yicl = coo.split(',');
        }
    }

    lc();

    // var yicl = ['HESUSDED', 'uglytwoi'];
    if (clb)
    {
        clb.onclick = (e)=>{
            //e.preventDefault();
            e.stopPropagation();
            clDiv.style.left = (clDiv.style.left == '0px' ? '-310px' : '0px');
            console.log(clt.value);
            setCookie('clist', clt.value, 365);
            lc();
            return false;
        };
    }

    //
    // Set a Cookie
    function setCookie(cName, cValue, expDays) {
        let date = new Date();
        date.setTime(date.getTime() + (expDays * 24 * 60 * 60 * 1000));
        const expires = "expires=" + date.toUTCString();
        document.cookie = cName + "=" + cValue + "; " + expires + "; path=/";
    }

    // Get a Cookie
    function getCookie(cName) {
      const name = cName + "=";
      const cDecoded = decodeURIComponent(document.cookie); //to be careful
      const cArr = cDecoded .split('; ');
      let res;
      cArr.forEach(val => {
          if (val.indexOf(name) === 0) res = val.substring(name.length);
      })
      return res;
    }
    //

    // Fullscreen mode && iframe
    function cfs()
    {
        clDiv.style.display = ((!window.screenTop && !window.screenY) || (window!=window.top) ? 'none' : 'block');
    }

    // start
    var fc = setInterval(function(e){

        cfs();

        // console.log(yicl);
        var clsbl = ['ytd-rich-item-renderer', 'ytd-video-renderer'];
        yicl.forEach(function(v, i, e){
            var lnk = document.querySelectorAll('a[href="' + v + '"]');
            if (lnk[0])
            {
                clsbl.forEach(function(v_bl){
                    var bl1 = lnk[0].closest(v_bl);
                    if (bl1) bl1.remove();
                });
            }
        });

    }, 200);

})();

 

GitHub репозиторий для скрипта

Сделал отдельный репозиторий для скрипта, который блокирует рекламу на DZEN.ru — https://github.com/VVSite/block-ads-dzen-video

Убрать надоедливые блоки анонсов при просмотре Yotube

Как убрать эти анонсы, перекрываюшие текущее видео?

1. Установите блокировщик рекламы uBlock Origin в магазине расширений для вашего браузера. Это ссылка на расширение для Firefox.

2. После установки расширения щелкните по кнопке расширения для вызова окна uBlock Origin, щелкните в окне кнопку настройки.

3. В появившемся окне выберите вкладке «Мои фильтры» и введите 4 строки:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
youtube.com##.ytp-ce-bottom-right-quad
youtube.com##.ytp-ce-bottom-left-quad
youtube.com##.ytp-ce-top-right-quad
youtube.com##.ytp-ce-top-left-quad
youtube.com##.ytp-ce-bottom-right-quad youtube.com##.ytp-ce-bottom-left-quad youtube.com##.ytp-ce-top-right-quad youtube.com##.ytp-ce-top-left-quad
youtube.com##.ytp-ce-bottom-right-quad
youtube.com##.ytp-ce-bottom-left-quad
youtube.com##.ytp-ce-top-right-quad
youtube.com##.ytp-ce-top-left-quad

4. Нажмите кнопку «Применить изменения».

5. Откройте Youtube и просмотрите какой-нибудь ролик до конца, убедитесь, что больше не видно анонсов других роликов по углам текущего видео.