Skip to content

Commit

Permalink
Update searchJumper.user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hoothin committed Aug 2, 2024
1 parent d9fdac7 commit 9c8446c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion searchJumper.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -9101,6 +9101,7 @@
self.customInput = false;
if (e.altKey && e.shiftKey) {
let targetSites = self.getTargetSitesByName(siteNames);
let viewWidth = window.innerWidth || document.documentElement.clientWidth;
let html = '<title>SearchJumper Multi</title><style>body{background: black; margin: 0;}iframe{box-sizing: border-box;padding: 5px}</style>';
let c = window.open("", "_blank"), i = 1;
for (let siteEle of targetSites) {
Expand All @@ -9109,7 +9110,7 @@
if (self.stopInput) return;
if (!siteEle.href) continue;
let iframe = document.createElement('iframe');
iframe.width = targetSites.length <= 2 ? '50%' : '33%';
iframe.width = targetSites.length <= 2 || viewWidth <= 1280 ? '50%' : '33%';
iframe.height = '100%';
iframe.frameBorder = '0';
iframe.sandbox = "allow-same-origin allow-scripts allow-popups allow-forms";
Expand Down

0 comments on commit 9c8446c

Please sign in to comment.