Tabview Youtube

把Youtube Videos中的評論及影片清單製作成Tabs

目前為 2023-10-14 提交的版本,檢視 最新版本

/*

MIT License

Copyright (c) 2021-2023 cyfung1031

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/
// ==UserScript==
// @name                  Tabview Youtube
// @name:en               Tabview Youtube
// @description           Make comments and lists into tabs for YouTube Videos
// @description:en        Make comments and lists into tabs for YouTube Videos
// @name:ja               Tabview Youtube
// @description:ja        YouTube動画のコメントやリストなどをタブに作成します
// @name:ko          Tabview Youtube
// @description:ko        YouTube 동영상의 댓글 및 목록을 탭으로 만듭니다
// @name:zh-TW            Tabview Youtube
// @name:zh-HK            Tabview Youtube
// @name:zh-CN            Tabview Youtube
// @description:zh-TW     把Youtube Videos中的評論及影片清單製作成Tabs
// @description:zh-HK     把Youtube Videos中的評論及影片清單製作成Tabs
// @description:zh-CN     把Youtube Videos中的评论及视频列表制作成Tabs
// @name:ru               Tabview Youtube
// @description:ru        Сделайте описание, комментарии и список видео в виде вкладок для видео на YouTube

// @name:af          Tabview Youtube
// @name:az          Tabview Youtube
// @name:id          Tabview Youtube
// @name:ms          Tabview Youtube
// @name:bs          Tabview Youtube
// @name:ca          Tabview Youtube
// @name:cs          Tabview Youtube
// @name:da          Tabview Youtube
// @name:de          Tabview Youtube
// @name:et          Tabview Youtube
// @name:es          Tabview Youtube
// @name:eu          Tabview Youtube
// @name:fr          Tabview Youtube
// @name:gl          Tabview Youtube
// @name:hr          Tabview Youtube
// @name:zu          Tabview Youtube
// @name:is          Tabview Youtube
// @name:it          Tabview Youtube
// @name:sw          Tabview Youtube
// @name:lv          Tabview Youtube
// @name:lt          Tabview Youtube
// @name:hu          Tabview Youtube
// @name:nl          Tabview Youtube
// @name:uz          Tabview Youtube
// @name:pl          Tabview Youtube
// @name:pt          Tabview Youtube
// @name:pt-BR          Tabview Youtube
// @name:ro          Tabview Youtube
// @name:sq          Tabview Youtube
// @name:sk          Tabview Youtube
// @name:sl          Tabview Youtube
// @name:sr          Tabview Youtube
// @name:fi          Tabview Youtube
// @name:sv          Tabview Youtube
// @name:vi          Tabview Youtube
// @name:tr          Tabview Youtube
// @name:be          Tabview Youtube
// @name:bg          Tabview Youtube
// @name:ky          Tabview Youtube
// @name:kk          Tabview Youtube
// @name:mk          Tabview Youtube
// @name:mn          Tabview Youtube
// @name:uk          Tabview Youtube
// @name:el          Tabview Youtube
// @name:hy          Tabview Youtube
// @name:ur          Tabview Youtube
// @name:ar          Tabview Youtube
// @name:fa          Tabview Youtube
// @name:ne          Tabview Youtube
// @name:mr          Tabview Youtube
// @name:hi          Tabview Youtube
// @name:as          Tabview Youtube
// @name:bn          Tabview Youtube
// @name:pa          Tabview Youtube
// @name:gu          Tabview Youtube
// @name:or          Tabview Youtube
// @name:ta          Tabview Youtube
// @name:te          Tabview Youtube
// @name:kn          Tabview Youtube
// @name:ml          Tabview Youtube
// @name:si          Tabview Youtube
// @name:th          Tabview Youtube
// @name:lo          Tabview Youtube
// @name:my          Tabview Youtube
// @name:ka          Tabview Youtube
// @name:am          Tabview Youtube
// @name:km          Tabview Youtube


// @description:af        Maak kommentaar en lyste as oortjies vir YouTube-video's
// @description:az        YouTube Videoları üçün şərhləri və siyahıları tablara çevirin
// @description:id        Ubah komentar dan daftar menjadi tab untuk Video YouTube
// @description:ms        Ubah komen dan senarai menjadi tab untuk Video YouTube
// @description:bs        Pretvorite komentare i liste u kartice za YouTube videozapise
// @description:ca        Converteix comentaris i llistes en pestanyes per a Vídeos de YouTube
// @description:cs        Převeďte komentáře a seznamy na karty pro YouTube videa
// @description:da        Lav kommentarer og lister til faner for YouTube-videoer
// @description:de        Machen Sie Kommentare und Listen zu Tabs für YouTube-Videos
// @description:et        Muutke kommentaarid ja loendid YouTube'i videote jaoks kaartideks
// @description:es        Convierte los comentarios y listas en pestañas para los Videos de YouTube
// @description:eu        Egin iruzkinak eta zerrendak YouTube Bideoetarako fitxetan
// @description:fr        Transformez les commentaires et les listes en onglets pour les vidéos YouTube
// @description:gl        Converte comentarios e listas en lapelas para Vídeos de YouTube
// @description:hr        Pretvorite komentare i popise u kartice za YouTube videe
// @description:zu        Yenza ukubhala phansi kanye nemingcele ukuba yiithebhu kuVidiyo ze-YouTube
// @description:is        Breyttu athugasemdum og listum í flipa fyrir YouTube myndbönd
// @description:it        Trasforma commenti e liste in schede per i Video di YouTube
// @description:sw        Geuza maoni na orodha kuwa vichupo kwa Video za YouTube
// @description:lv        Pārveidojiet komentārus un sarakstus cilnēs YouTube video
// @description:lt        Paverčia komentarus ir sąrašus skirtukais YouTube vaizdo įrašams
// @description:hu        Alakítsa át a megjegyzéseket és listákat fülekké a YouTube videókhoz
// @description:nl        Maak van reacties en lijsten tabs voor YouTube-video's
// @description:uz        YouTube videolar uchun sharhlar va ro'yxatlarni ichki oynalar qiling
// @description:pl        Przekształć komentarze i listy w karty dla filmów na YouTube
// @description:pt        Transforme comentários e listas em abas para Vídeos do YouTube
// @description:pt-BR     Transforme comentários e listas em abas para Vídeos do YouTube
// @description:ro        Transformă comentariile și listele în file pentru Videoclipuri YouTube
// @description:sq        Kthe komentet dhe listat në skeda për Videot në YouTube
// @description:sk        Premente komentáre a zoznamy na karty pre YouTube videá
// @description:sl        Pretvori komentarje in sezname v zavihke za YouTube videe
// @description:sr        Pretvorite komentare i liste u kartice za YouTube videe
// @description:fi        Muuta kommentit ja luettelot välilehdiksi YouTube-videoille
// @description:sv        Gör kommentarer och listor till flikar för YouTube-videor
// @description:vi        Chuyển đổi bình luận và danh sách thành tab cho Video YouTube
// @description:tr        Yorumları ve listeleri YouTube Videoları için sekmelere dönüştürün
// @description:be        Пераўтварыце каментарыі і спісы ў закладкі для відэа на YouTube
// @description:bg        Превърнете коментарите и списъците в раздели за видеоклипове в YouTube
// @description:ky        YouTube видеолору үчүн эскертүүлөрдү жана тизмелерди табдыктарга айлантырыңыз
// @description:kk        Пікірлер мен тізімдерді YouTube видеолары үшін қоймақтарға айналдырыңыз
// @description:mk        Претворете ги коментарите и листите во јазичиња за Видеа на YouTube
// @description:mn        YouTube видео дэх сэтгэгдлүүд болон жагсаалтыг табчууд болгоно уу
// @description:uk        Зробіть коментарі та списки у вкладки для відео на YouTube
// @description:el        Μετατρέψτε τα σχόλια και τις λίστες σε καρτέλες για τα βίντεο του YouTube
// @description:hy        Վերածեք մեկնաբանությունները և ցուցակները YouTube տեսանյութերի ներդիրների
// @description:ur        YouTube ویڈیوز کے لئے تبصرے اور فہرستوں کو ٹیب میں تبدیل کریں
// @description:ar        قم بتحويل التعليقات والقوائم إلى علامات تبويب لفيديوهات YouTube
// @description:fa        نظرات و فهرست ها را به زبانه ها برای ویدیوهای YouTube تبدیل کنید
// @description:ne        YouTube भिडियोहरूका लागि प्रतिक्रिया र सूचीहरूलाई ट्याबहरूमा परिवर्तन गर्नुहोस्
// @description:mr        YouTube व्हिडिओसाठी टिप्पण्या आणि यादीतबांमध्ये करा
// @description:hi        YouTube वीडियो के लिए टिप्पणियाँ और सूचियों को टैब में बदलें
// @description:as        YouTube ভিডিঅ'ৰ বাবে মন্তব্য আৰু তালিকাসমূহ টেবলত পৰিণত কৰক
// @description:bn        YouTube ভিডিওর জন্য মন্তব্য এবং তালিকা ট্যাবে পরিণত করুন
// @description:pa        ਯੂਟਿਊਬ ਵੀਡੀਓਜ਼ ਲਈ ਟਿੱਪਣੀਆਂ ਅਤੇ ਸੂਚੀਆਂ ਨੂੰ ਟੈਬਾਂ ਵਿੱਚ ਬਦਲੋ
// @description:gu        YouTube વિડિઓ માટે ટિપ્પણીઓ અને યાદીઓ ટૅબમાં બદલો
// @description:or        YouTube ଭିଡିଓ ପାଇଁ ମନ୍ତବ୍ୟ ଏବଂ ତାଲିକାଗୁଡ଼ିକ ଟ୍ୟାବମାନେ ପରିବର୍ତ୍ତନ କରନ୍ତୁ
// @description:ta        YouTube வீடியோக்கான கருத்துக்கள் மற்றும் பட்டியல்களை தாவல்களாக மாற்றவும்
// @description:te        YouTube వీడియోల కోసం వ్యాఖ్యలు మరియు జాబితాలను ట్యాబ్లలుగా మార్చండి
// @description:kn        YouTube ವೀಡಿಯೊಗಳಿಗಾಗಿ ಟಿಪ್ಪಣಿಗಳನ್ನು ಮತ್ತು ಪಟ್ಟಿಗಳನ್ನು ಟ್ಯಾಬ್‌ಗಳಾಗಿ ಮಾಡಿ
// @description:ml        YouTube വീഡിയോകൾക്കായി അഭിപ്രായങ്ങളും പട്ടികകളും ടാബുകളായി മാറ്റുക
// @description:si        YouTube වීඩියෝ සඳහා අදහස් සහ ලැයිස්තු ටැබ් කරන්න
// @description:th        ทำให้ความคิดเห็นและรายการเป็นแท็บสำหรับวิดีโอ YouTube
// @description:lo        ປ່ຽນຄວາມເຫັນຂອງຄົນເບິ່ງແລະລາຍການເປັນແຖບສໍາລັບວິດີໂອ YouTube
// @description:my        YouTube ဗီဒီယိုများအတွက် မှတ်ချက်များနှင့် စာရင်းများကို Tabs အဖြစ် ပြောင်းပါ
// @description:ka        გადაიყვანეთ კომენტარები და სიები ჩანართებში YouTube ვიდეოებისთვის
// @description:am        አስተያየቶችን እና ዝርዝሮችን YouTube ቪዲዮዎች ለትርጓሜዎች ውስጥ ያስተካክሉ
// @description:km        បង្កើតមតិយោបល់និងបញ្ជីទៅជាផ្ទាំងសម្រាប់វីដេអូ YouTube

// @version               4.61.0
// @resource              contentCSS        https://raw.githubusercontent.com/cyfung1031/Tabview-Youtube/1f47d2d02d3d762fdf90412d1793c17835290a3c/css/style_content.css
// @resource              chatCSS           https://raw.githubusercontent.com/cyfung1031/Tabview-Youtube/1f47d2d02d3d762fdf90412d1793c17835290a3c/css/style_chat.css
// @resource              controlCSS        https://raw.githubusercontent.com/cyfung1031/Tabview-Youtube/1f47d2d02d3d762fdf90412d1793c17835290a3c/css/style_control.css
// @resource              injectionJS1      https://raw.githubusercontent.com/cyfung1031/Tabview-Youtube/1f47d2d02d3d762fdf90412d1793c17835290a3c/js/injection_script_1.js
// @require               https://gf.qytechs.cn/scripts/465421-vanilla-js-dialog/code/Vanilla%20JS%20Dialog.js?version=1188332

// @namespace             http://tampermonkey.net/
// @author                CY Fung
// @license               MIT
// @supportURL            https://github.com/cyfung1031/Tabview-Youtube
// @run-at                document-start
// @match                 https://www.youtube.com/*
// @exclude               /^https?://\S+\.(txt|png|jpg|jpeg|gif|xml|svg|manifest|log|ini)[^\/]*$/
// @icon                  https://github.com/cyfung1031/Tabview-Youtube/raw/main/images/icon128p.png

// @compatible            edge Edge [Blink] >= 79;                      Tampermonkey (Beta) / Violentmonkey
// @compatible            chrome Chrome >= 54;                          Tampermonkey (Beta) / Violentmonkey
// @compatible            firefox FireFox / Waterfox (Classic) >= 55;   Tampermonkey / Violentmonkey
// @compatible            opera Opera >= 41;                            Tampermonkey (Beta) / Violentmonkey
// @compatible            safari Safari >= 12.1

// @grant                 GM_getResourceText
// @grant                 GM.getResourceText
// @grant                 GM_registerMenuCommand
// @noframes
// ==/UserScript==

/* jshint esversion:8 */

function main(){
  'use strict';
  // MIT License
  // https://github.com/cyfung1031/Tabview-Youtube/raw/main/js/content.js

{{CONTENT}}

  // https://github.com/cyfung1031/Tabview-Youtube/raw/main/js/content.js
}


; !(async () => {
  'use strict';

  const o = [{
    id: 'tabview-css-content',
    resTag: 'contentCSS',
  }, {
    id: 'tabview-css-chat',
    resTag: 'chatCSS'
  }, {
    id: 'tabview-css-control',
    resTag: 'controlCSS'
  }];

  const Promise = (async () => { })().constructor;

  const contents = o.map(e => {
    e = e.resTag;
    return GM_getResourceText(e) || GM.getResourceText(e) || '';
  });

  const texts = await Promise.all(contents);

  while (document.documentElement === null) {
    await new Promise(r => window.requestAnimationFrame(r));
  }

  const target = document.head || document.documentElement;
  let i = 0;
  for (const e of o) {
    const text = texts[i++];
    if (text) {
      const styleNode = document.createElement('style');
      styleNode.id = e.id;
      styleNode.textContent = text;
      target.appendChild(styleNode);
    }
  }

  main();

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址