Greasy Fork is available in English.

Simple YouTube Age Restriction Bypass

Watch age restricted videos on YouTube without login and without age verification 😎

< 腳本Simple YouTube Age Restriction Bypass的回應

評論:負評 - 腳本失效或無法使用

§
發表於:2024-08-08
編輯:2024-08-08

Use this code to bypass "TrustedHTML"

// TrustedHTML issue
function createElement(tagName, options) {
  const node = document.createElement(tagName);

  if (options) {
      // Assign properties to the node
      Object.keys(options).forEach(key => {
          if (key === 'innerHTML') {
              // If innerHTML is provided, create a text node instead
              const textNode = document.createTextNode(options[key]);
              node.appendChild(textNode);
          } else {
              node[key] = options[key];
          }
      });
  }

  return node;
}

from

function createElement(tagName, options) {
    const node = document.createElement(tagName);
    options && Object.assign(node, options);
    return node;
}
§
發表於:2024-08-09

Thanks man!

§
發表於:2024-08-09

You're a chad

§
發表於:2024-08-10

Great !
Thanks

And of course, thanks to zerodytrash for this script.

§
發表於:2024-08-10

where exactly do I have to insert this, because I have no idea about programming, and just want to watch videos on YouTube undisturbed. Yesterday this extension still worked

§
發表於:2024-08-11

I suggest that you duplicate the userscript before editing it. So that the original script can still update automatically (depending on the settings of your userscript manager).

Anyway, duplicating is not necessary.

Here is how to modify:

Open the userscript in your scripts manager.
In the "Editor" tab (named like that in Tampermonkey), search for "function createElement". The code will scroll to the source of the function. You will see the code that is displayed above under "from".
You replace that code (5 lines, including the closing } ) with the new code that is display here above the old code. (everything between // TrustedHTML issue and } )

Once you have done that, save the script in the scripts manager. There is a command in a menu of the manager, or a button. CTRL+S should also work (at least in tampermonkey).

§
發表於:2024-08-11

Thank you very much it works X3

§
發表於:2024-08-14

I think I did it right, though I might be stupid. Anyway it's not working for me. Is this fix still working for others?

§
發表於:2024-08-14

I think I did it right, though I might be stupid. Anyway it's not working for me. Is this fix still working for others?




The developer already fixed the problem, check for update!!!

發表回覆

登入以回復