From f2120736de7c6ab8edf76472f2ad1d6b1178a0a2 Mon Sep 17 00:00:00 2001 From: Mati02K Date: Fri, 8 Apr 2022 11:11:07 +0530 Subject: [PATCH] emulator bug has been resolved and unwanted phone sizes have been removed --- html/popup.html | 1 - html/request.html | 3 +-- js/eventpage.js | 36 +++++++++++++++++++++++++++++++++++- js/popup.js | 4 ++-- 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/html/popup.html b/html/popup.html index 469461d..cb42c57 100644 --- a/html/popup.html +++ b/html/popup.html @@ -29,7 +29,6 @@

Quasar Developer Tools

- diff --git a/html/request.html b/html/request.html index ad2c4e1..21cf3ab 100644 --- a/html/request.html +++ b/html/request.html @@ -18,7 +18,7 @@
@@ -102,7 +102,6 @@

Response

- diff --git a/js/eventpage.js b/js/eventpage.js index 9ef6961..3ff6c55 100644 --- a/js/eventpage.js +++ b/js/eventpage.js @@ -3,7 +3,7 @@ const openEmulator = (url, width, height) => { url : url, type : 'popup', top : 10, - left : 400, + left : 300, width : width, height : height, focused : true, @@ -19,111 +19,133 @@ const getSize = (phoneName) => { width : 414, height : 736, } + break; case 'iPhone 12 mini' : size = { width : 360, height : 780, } + break; case 'iPhone 12' : size = { width : 390, height : 844, } + break; case 'iPhone 12 Pro Max' : size = { width : 428, height : 926, } + break; case 'iPad Pro' : size = { width : 1024, height : 1366, } + break; case 'Apple iPad 10.2' : size = { width : 810, height : 1080, } + break; case 'Samsung S22 ultra' : size = { width : 360, height : 772, } + break; case 'Galaxy S9' : size = { width : 360, height : 740, } + break; case 'Galaxy Note 9' : size = { width : 414, height : 846, } + break; case 'Galaxy A30' : size = { width : 412, height : 892, } + break; case 'Galaxy S20 Ultra' : size = { width : 412, height : 915, } + break; case 'OnePlus 6T' : size = { width : 412, height : 892, } + break; case 'OnePlus 8T' : size = { width : 412, height : 914, } + break; case 'OnePlus 8' : size = { width : 412, height : 915, } + break; case 'Xperia L4' : size = { width : 360, height : 840, } + break; case 'Xperia Z5' : size = { width : 360, height : 640, } + break; case 'LG Nexus 5' : size = { width : 360, height : 640, } + break; case 'LG G6' : size = { width : 360, height : 720, } + break; case 'LG W30' : size = { width : 360, height : 760, } + break; case 'LG G7 Fit' : size = { width : 360, height : 780, } + break; case 'MatePad Pro' : size = { width : 1280, height : 800, } + break; case 'Huawei P9' : size = { width : 360, height : 640, } + break; case 'Huawei Mate 10 Lite' : size = { width : 360, @@ -134,61 +156,73 @@ const getSize = (phoneName) => { width : 360, height : 760, } + break; case 'Nova 7i' : size = { width : 360, height : 770, } + break; case 'Huawei P40' : size = { width : 360, height : 780, } + break; case 'Redmi Note 7' : size = { width : 393, height : 851, } + break; case 'Redmi Mi 3' : size = { width : 360, height : 780, } + break; case 'Redmi Note 9 Pro' : size = { width : 393, height : 873, } + break; case 'Poco X4 Pro' : size = { width : 360, height : 780, } + break; case 'Pixel' : size = { width : 412, height : 732, } + break; case 'Pixel 3' : size = { width : 412, height : 732, } + break; case 'Pixel 3 XL' : size = { width : 412, height : 732, } + break; case 'Pixel 4' : size = { width : 393, height : 851, } + break; case 'Pixel 4 XL' : size = { width : 412, height : 780, } + break; default : size = { width : 360, diff --git a/js/popup.js b/js/popup.js index d5d0134..efd72e1 100644 --- a/js/popup.js +++ b/js/popup.js @@ -1,4 +1,4 @@ -$('#emulator').change(() => { +$('#emulator').change(function() { const $option = $(this).find('option:selected'); const value = $option.val(); const sendDetails = { @@ -6,7 +6,7 @@ $('#emulator').change(() => { type : 'openEmulator', }; chrome.runtime.sendMessage(sendDetails, (response) => { - console.log('Opening the Emulator'); + console.log('Sending Your Code'); }); });