Skip to content

Commit

Permalink
illegal return statement my ***
Browse files Browse the repository at this point in the history
  • Loading branch information
VillainsRule authored Dec 18, 2023
1 parent 69eaf8d commit d585811
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions static/assets/scripts/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ try {

if (!inFrame && !navigator.userAgent.includes('Firefox')) {
const popup = open('about:blank', '_blank')
if (!popup || popup.closed) return alert('Please allow popups and redirects.');

popup.document.write(`
<iframe src="${location.href}" style="position:fixed;top:0;left:0;width:100%;height:100%;outline:none;border:none;"></iframe>
<title>${localStorage.getItem('name') || 'My Drive - Google Drive'}</title>
<link rel="icon" href="${localStorage.getItem('icon') || 'https://ssl.gstatic.com/assets/media/branding/product/1x/drive_2020q4_32dp.png'}">
`);
if (!popup || popup.closed) alert('Please allow popups and redirects.');
else {
popup.document.write(`
<iframe src="${location.href}" style="position:fixed;top:0;left:0;width:100%;height:100%;outline:none;border:none;"></iframe>
<title>${localStorage.getItem('name') || 'My Drive - Google Drive'}</title>
<link rel="icon" href="${localStorage.getItem('icon') || 'https://ssl.gstatic.com/assets/media/branding/product/1x/drive_2020q4_32dp.png'}">
`);

location.replace(localStorage.getItem('panicLink') || 'https://classroom.google.com');
location.replace(localStorage.getItem('panicLink') || 'https://classroom.google.com');
};
};

document.addEventListener("DOMContentLoaded", function(event) {
Expand Down

0 comments on commit d585811

Please sign in to comment.