Skip to content

Commit

Permalink
emulator bug has been resolved and unwanted phone sizes have been rem…
Browse files Browse the repository at this point in the history
…oved
  • Loading branch information
Mati02K committed Apr 8, 2022
1 parent 1738b0c commit f212073
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
1 change: 0 additions & 1 deletion html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ <h1>Quasar Developer Tools</h1>
<option value="iPhone 12 Pro Max">iPhone 12 Pro Max/13 Pro Max</option>
<option value="iPad Pro">iPad Pro</option>
<option value="Apple iPad 10.2">Apple iPad (10.2)</option>
<option value="Apple iPad Mini">Apple iPad Mini</option>
<optgroup label="Samsung">
<option value="Samsung S22 ultra">Samsung S22 Ultra</option>
<option value="Galaxy S9">Galaxy S9/S9+/S8/S8+</option>
Expand Down
3 changes: 1 addition & 2 deletions html/request.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div class="p-4">
<div class="logo">
<img src="/icons/Quasar_Community_Logo.png" alt="">
<img src="/icons/Quasar_Community_Logo.png" alt="Quasar Community Logo">
</div>
<form data-form>
<div class="input-group mb-4">
Expand Down Expand Up @@ -102,7 +102,6 @@ <h3>Response</h3>
</div>
</template>

<!-- JavaScript Bundle with Popper -->
<script src="../js/vendor/bootstrap.bundle.min.js"></script>
<script src="../js/vendor/jquery-3.6.0.min.js"></script>
<script src="../js/request.js"></script>
Expand Down
36 changes: 35 additions & 1 deletion js/eventpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions js/popup.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
$('#emulator').change(() => {
$('#emulator').change(function() {
const $option = $(this).find('option:selected');
const value = $option.val();
const sendDetails = {
val : value,
type : 'openEmulator',
};
chrome.runtime.sendMessage(sendDetails, (response) => {
console.log('Opening the Emulator');
console.log('Sending Your Code');
});
});

Expand Down

0 comments on commit f212073

Please sign in to comment.