Telegram Media Forward On Private Channel

Tự động chuyển tiếp hoặc tải media từ kênh riêng tư trên Telegram Web

目前為 2025-06-27 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Telegram Media Forward On Private Channel
// @name:en      Telegram Media Forward On Private Channel
// @name:vi      Telegram Chuyển Tiếp Media Trên Kênh Riêng Tư
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Tự động chuyển tiếp hoặc tải media từ kênh riêng tư trên Telegram Web
// @description:en Auto forward or download media from private Telegram channels
// @description:vi Tự động chuyển tiếp hoặc tải media từ kênh riêng tư trên Telegram Web
// @author       TurtleD
// @match        https://web.telegram.org/*
// @match        https://webk.telegram.org/*
// @match        https://webz.telegram.org/*
// @grant        none
// @license      D07
// @icon         https://www.google.com/s2/favicons?sz=64&domain=telegram.org
// ==/UserScript==  

(function() {
    //Enable forward and delete button 
    setInterval(function() {
  document.querySelector('.selection-container-forward').disabled = false;
  document.querySelector('.selection-container-delete').disabled = false;
}, 500); // 1000ms = 1s

function addCheckboxToAlbumItems() {
  // Get all album-item
  const albumItems = document.querySelectorAll('.album-item');

  albumItems.forEach((item, index) => {
    // Check checkbox-field and add new 
    if (!item.querySelector('.checkbox-field')) {
      // Tạo phần tử checkbox
      const checkboxWrapper = document.createElement('label');
      checkboxWrapper.classList.add('checkbox-field', 'checkbox-field-round', 'checkbox-without-caption', 'bubble-select-checkbox');

      const checkboxInput = document.createElement('input');
      checkboxInput.type = 'checkbox';
      checkboxInput.id = `input-${index + 1}`; // Set ID for checkbox

      const checkboxBox = document.createElement('div');
      checkboxBox.classList.add('checkbox-box');

      const checkboxBorder = document.createElement('div');
      checkboxBorder.classList.add('checkbox-box-border');

      const checkboxBackground = document.createElement('div');
      checkboxBackground.classList.add('checkbox-box-background');

      const checkboxCheck = document.createElement('svg');
      checkboxCheck.classList.add('checkbox-box-check');
      checkboxCheck.setAttribute('viewBox', '0 0 24 24');
      const useElem = document.createElement('use');
      useElem.setAttribute('href', '#check');
      checkboxCheck.appendChild(useElem);

      // Create checkbox structure  
      checkboxBox.appendChild(checkboxBorder);
      checkboxBox.appendChild(checkboxBackground);
      checkboxBox.appendChild(checkboxCheck);

      checkboxWrapper.appendChild(checkboxInput);
      checkboxWrapper.appendChild(checkboxBox);

      item.prepend(checkboxWrapper);  // Add checkbox in album-item
    }
  });
}

addCheckboxToAlbumItems();


})();

QingJ © 2025

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