@@ -1178,7 +1178,7 @@ class WebViewFullState extends State<WebViewFull> with WidgetsBindingObserver {
1178
1178
_terminalProvider.terminal = "Terminal" ;
1179
1179
1180
1180
// Userscripts initial load
1181
- if (Platform .isAndroid || (Platform .isIOS && widget.windowId == null ) || Platform .isWindows) {
1181
+ if (Platform .isAndroid || (Platform .isIOS && widget.windowId == null ) || Platform .isWindows && widget.windowId == null ) {
1182
1182
UnmodifiableListView <UserScript > handlersScriptsToAdd = _userScriptsProvider.getHandlerSources (
1183
1183
apiKey: _userProvider? .basic? .userApiKey ?? "" ,
1184
1184
);
@@ -1194,6 +1194,10 @@ class WebViewFullState extends State<WebViewFull> with WidgetsBindingObserver {
1194
1194
_terminalProvider.addInstruction (
1195
1195
"TORN PDA NOTE: iOS does not support user scripts injection in new windows (like this one), but only in "
1196
1196
"full webviews. If you are trying to run a script, close this tab and open a new one from scratch." );
1197
+ } else if (Platform .isWindows && widget.windowId != null ) {
1198
+ _terminalProvider.addInstruction (
1199
+ "TORN PDA NOTE: Windows does not support user scripts injection in new windows (like this one), but only in "
1200
+ "full webviews. If you are trying to run a script, close this tab and open a new one from scratch." );
1197
1201
}
1198
1202
1199
1203
// Copy to clipboard from the log doesn't work so we use a handler from JS fired from Torn
@@ -1294,7 +1298,7 @@ class WebViewFullState extends State<WebViewFull> with WidgetsBindingObserver {
1294
1298
final lockedTabCancels = _lockedTabShouldCancelsNavigation (action.request.url);
1295
1299
if (lockedTabCancels) return NavigationActionPolicy .CANCEL ;
1296
1300
1297
- if (Platform .isAndroid || (Platform .isIOS && widget.windowId == null ) || Platform .isWindows) {
1301
+ if (Platform .isAndroid || (Platform .isIOS && widget.windowId == null ) || Platform .isWindows && widget.windowId == null ) {
1298
1302
// Userscripts load before webpage begins loading
1299
1303
UnmodifiableListView <UserScript > handlersScriptsToAdd = _userScriptsProvider.getHandlerSources (
1300
1304
apiKey: _userProvider? .basic? .userApiKey ?? "" ,
0 commit comments