Cross Origin iframes: Difference between revisions

From SWKLS WIKI
Jump to navigation Jump to search
No edit summary
No edit summary
Line 21: Line 21:




Run Chrome with special command. It is Suggested that Chrome be closed before performing the following steps
Another option to run Chrome with special command. It is Suggested that Chrome be closed before performing the following steps


# Open the RUN dialog box with By Pressing [WIndowsKey + R ]
# Open the RUN dialog box with By Pressing [WIndowsKey + R ]

Revision as of 13:45, 30 July 2021

As of Chromium v92 -> Feature: Remove alert(), confirm(), and prompt for cross origin iframes. This causes issues in both VERSO and SHAREit

https://www.chromestatus.com/feature/5148698084376576

https://groups.google.com/a/chromium.org/g/blink-dev/c/VOePv--Qa-4/m/uoTP-h4-BAAJ?pli=1

https://bugs.chromium.org/p/chromium/issues/detail?id=1065085

https://chromeenterprise.google/policies/#SuppressDifferentOriginSubframeDialogs

https://stackoverflow.com/questions/68505281/chrome-suppressdifferentoriginsubframejsdialogs-setting-override-using-js


Set Registry Keys (assuming Chrome Enterprise or Edge)

reg add HKLM\Software\Policies\Google\Chrome /v SuppressDifferentOriginSubframeDialogs /t REG_DWORD /d 0
reg add HKLM\SOFTWARE\Policies\Microsoft\Edge /v SuppressDifferentOriginSubframeDialogs /t REG_DWORD /d 0


Another option to run Chrome with special command. It is Suggested that Chrome be closed before performing the following steps

  1. Open the RUN dialog box with By Pressing [WIndowsKey + R ]
  2. Copy and paste (or Type) the following command: chrome.exe --disable-features="SuppressDifferentOriginSubframeJSDialogs"
  3. Press OK



We tried rolling out a shortcut for Chrome that included the SuppressDifferentOriginSubframeJSDialogs flag, but it did not work as expected. Remove Shortcut:

#!ps
#timeout=50000
$Desk=[Environment]::GetFolderPath("CommonDesktopDirectory")
Remove-Item "$Desk\chrome temp fix.lnk" -Force

Ensure non-functioning shortcut is removed. Check Folder Contents:

#!ps
$Desk=[Environment]::GetFolderPath("CommonDesktopDirectory")
Get-ChildItem -Path $Desk


For reference only, this did not work as expected.

#!ps
#timeout=50000
$googlefile = Test-Path "c:\program files (x86)\google\chrome\application\chrome.exe" -PathType Leaf
if ($googlefile -ne $true) {
	$WshShell = New-Object -comObject WScript.Shell
	$Desk=[Environment]::GetFolderPath("CommonDesktopDirectory")
	$Shortcut = $WshShell.CreateShortcut("$Desk\chrome temp fix.lnk")
	$Shortcut.TargetPath = '"C:\Program Files\Google\Chrome\Application\chrome.exe"'
	$Shortcut.Arguments = '--disable-features="SuppressDifferentOriginSubframeJSDialogs"'
	$Shortcut.WorkingDirectory = 'C:\Program Files\Google\Chrome\Application'
	$Shortcut.Save()
} else {
	$WshShell = New-Object -comObject WScript.Shell
	$Desk=[Environment]::GetFolderPath("CommonDesktopDirectory")
	$Shortcut = $WshShell.CreateShortcut("$Desk\chrome temp fix.lnk")
	$Shortcut.TargetPath = '"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"'
	$Shortcut.Arguments = '--disable-features="SuppressDifferentOriginSubframeJSDialogs"'
	$Shortcut.WorkingDirectory = 'C:\Program Files (x86)\Google\Chrome\Application'
	$Shortcut.Save()
}