[Orion] Userscript Execution Failure inside iframe under YouTube domain
Happens in both Violentmonkey and MeddleMonkey
Reproduction Steps
- Create the script for testing
// ==UserScript==
// @name Script-VM300
// @namespace Test.org
// @description A test
// @author tester
// @version 0.0.1
// @grant none
// @match https://*/*
// ==/UserScript==
const tag = `vm300${(Math.floor(Math.random()*300+110)+ (window.top !== window ? 500 : 0))}`;
console.log(tag, location.href)
if(window.top === window){
setTimeout(()=>{
console.log(`${tag}-iframe`);
document.body.appendChild(document.createElement('iframe')).src=`https://google.com/robots.txt`;
},800)
}
Go to any page of https://example.com, https://google.com, https://www.youtube.com, https://duckduckgo.com, https://kahoot.it
Expected Result
Go to any page of https://www.youtube.com, https://m.youtube.com
Incorrect Console Log - Indicating no execution inside iframe
Environment:
- OS: macOS M1 Pro
- Browser: Orion Version 0.99.126.3-beta (WebKit 618.1.2)
- Violentmonkey Version: latest CI build
0.99.126.3-beta (WebKit 618.1.2)
Monterey (12)
Remarks
Other
@dino do you know why the userscript injection (not to the specific extension but to the specific domain) does not work in iframe under youtube.com ? I believe there is a special treatment to Youtube's iframe so it prevents the execution of userscript injection inside YouTube's iframe.
I have tested in both Violentmonkey and MeddleMonkey so I am sure this is due to Orion.