YouTube မှာ သင် Subscribe ပြုလုပ်ထားတဲ့ Channel တော်တော်များများကို Unsubscribe ပြုလုပ်ချင်ရင် ၁ ခုချင်းစီကို Unsubscribe ပြုလုပ်ရတဲ့အတွက် တော်တော် အလုပ်ရှုပ်မှာပါ။ အဲဒီအစား အားလုံးကို တစ်ပြိုင်နက် Unsubscribe ပြုလုပ်ပြီးမှ သင်နှစ်သက်တဲ့ တချို့ကို Subscribe ပြန်လုပ်တာက ပိုအဆင်ပြေစေပါတယ်။

ဒီဆောင်းပါးမှာ နည်းလမ်း ၂ ခုကို ပြောပြချင်ပါတယ်။ ၁ နည်းက Subscription Manager ကနေ Channel ၁ ခုချင်းစီကို Unsubscribe ပြုလုပ်နည်းနဲ့ နောက် ၁ နည်းက Inspect Element ကို သုံးပြီး အားလုံးကို တစ်ပြိုင်နက် Unsubscribe ပြုလုပ်နည်းတို့ ဖြစ်ပါတယ်။

၁။ Subscription Manager ကို အသုံးပြုနည်း

How to unsubscribe from all your YouTube channels at once

  • YouTube.com မှာ သင့် အကောင့်နဲ့ Log In ဝင်ပါ။
  • ဘယ်ဘက်ခြမ်းက Subscriptions ထဲသွားပါ။
  • ဒါဆိုရင် သင် မကြာခင်က ကြည့်ထားတဲ့ Video တွေနဲ့ Subscribe ပြုလုပ်ထားတဲ့ Channel တွေကို ပြသပေးမှာပါ။ Manage ကို နှိပ်ပါ။
  • သင် Subscribe ပြုလုပ်ထားတဲ့ Channel စာရင်းကို ပြသပေးမှာ ဖြစ်ပြီး ဘေးဘက်မှာ Unsubscribe လုပ်နိုင်တဲ့ ခလုတ် ၁ ခုကို တွေ့ရမှာပါ။
  • အဲဒီ ခလုတ်ကို နှိပ်ပြီး သင် မနှစ်သက်တဲ့ Channel တွေကို Unsubscribe ပြုလုပ်နိုင်ပါတယ်။

၂။ Inspect Element ကို အသုံးပြုနည်း

အပေါ်က နည်းအတိုင်း Subscribe ပြုလုပ်ထားတဲ့ Channel တွေကို ဖွင့်ပါ။ Channel စာရင်း ဆုံးတဲ့အထိ အောက်ဆုံးကို သွားပြီး Right Click နှိပ်ကာ Inspect or Inspect Element ကို ရွေးပါ။

အပေါ်မှာ Tab တွေ ပေါ်လာမှာ ဖြစ်ပြီး Console Tab ထဲသွားပါ။ အောက်ပါ Code ကို Copy လုပ်ပြီး Console Window ရဲ့ အောက်ခြေမှာ Paste လုပ်ကာ Enter နှိပ်ပါ။

/**

 * Youtube bulk unsubsribe fn.

 * Wrapping this in an IIFE for browser compatibility.

 */

(async function iife() {

  // This is the time delay after which the "unsubscribe" button is "clicked"; Tweak to your liking!

  var UNSUBSCRIBE_DELAY_TIME = 2000

/**

 * Delay runner. Wraps `setTimeout` so it can be `await`ed on.

 * @param {Function} fn

 * @param {number} delay

 */

  var runAfterDelay = (fn, delay) => new Promise((resolve, reject) => {

    setTimeout(() => {

      fn()

      resolve()

    }, delay)

  })

  // Get the channel list; this can be considered a row in the page.

  var channels = Array.from(document.getElementsByTagName(`ytd-channel-renderer`))

  console.log(`${channels.length} channels found.`)

  var ctr = 0

  for (const channel of channels) {

    // Get the subsribe button and trigger a "click"

    channel.querySelector(`[aria-label^='Unsubscribe from']`).click()

    await runAfterDelay(() => {

      // Get the dialog container...

      document.getElementsByTagName(`yt-confirm-dialog-renderer`)[0]

        // and find the confirm button...

        .querySelector(`#confirm-button`)

        // and "trigger" the click!

        .click()

      console.log(`Unsubsribed ${ctr + 1}/${channels.length}`)

      ctr++

    }, UNSUBSCRIBE_DELAY_TIME)

  }

})()

ဒါဆိုရင် Channel အားလုံးကို ၁ ခုချင်းစီ Unsubscribe အလိုလို ပြုလုပ်ပေးမှာပါ။ အဲဒီ Process က အချိန်မရွေး ရပ်သွားနိုင်ပြီး အထက်က Code ကို ပြန် Run ပြီး Channel စာရင်း ကုန်သွားတဲ့အထိ ဆက်လက် လုပ်ဆောင်နိုင်ပါတယ်။

Ref : thewindowsclub