[Скрипт] Возвращаем старый дизайн на YouTube

Нравиться ли вам новый дизайн YouTube

  • Да

    Голосов: 3 75,0%
  • Нет

    Голосов: 1 25,0%

  • Всего проголосовало
    4

iiAlex_Wens

iiAlex_Wensii
Дней с нами
2.794
Розыгрыши
0
Сообщения
16
Репутация
0
Реакции
3
Всем доброго времени суток, есть множества способов вернуть старый дизайн на YouTube, но те или иные способы бывают не всегда рабочими и оптимизированными.

Мой личный способ.

Устанавливаем расширение Tampermonkey [Chrome]
Ссылка: https://vk.cc/7TuESk

Заходите в настройки и добавляете скрипт который находиться ниже.

upload_2018-6-18_22-58-56.png

Затем нажимаете "фаил" сохранить и всё!

••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
// ==UserScript==
// @Name Youtube old design
// @namespace 4c5725cd7d4b94b6f1784e759d5a43fbdd917971
// @version 0.1
// @description Activates the old YT design without messing with your other settings
// @author /u/AyrA_ch
// @match https://www.youtube.com/*
// @match http://www.youtube.com/*
// @match https://youtube.com/*
// @match http://youtube.com/*
// @GranT none
// @run-at document-start
// ==/UserScript==

(function () {
var getDesignCookie = function (cookie) {
//Find existing preferences
var prefs = cookie.split("; ").filter(function (v) {
return v.indexOf("PREF=") === 0;
})[0];
//No preferences, return new ones with design setting
if (!prefs) {
console.log("prefs not set in cookie");
return "PREF=f6=8";
}
//Process all settings
var entries = prefs.substr(5).split('&');
var set = false;
for (var i = 0; i < entries.length; i++) {
if (entries.indexOf("f6=") === 0) {
set = true;
//Set the old design flag
var value = +entries.substr(3);
if ((value & 8) === 0) {
console.log("Activating old design and reloading...");
entries = "f6=" + (value | 8);
window.setTimeout(location.reload.bind(location,true),100);
}
else{
console.log("Old design already active. Doing nothing");
}
}
}
//Design flag setting doesn't exists. Adding it instead
if (!set) {
console.log("Activating old design and reloading...");
entries.push("f6=8");
window.setTimeout(location.reload.bind(location,true),100);
}
//Build cookie
return "PREF=" + entries.join('&');
};
//Update cookie
document.cookie = getDesignCookie(document.cookie) + ";domain=.youtube.com;path=/";
})();

••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••