-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Refine the popup window size and sidebar remember logic
- Loading branch information
Showing
5 changed files
with
23 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
ui/ariang/js/aria-ng-860b712940.min.js → ui/ariang/js/aria-ng-3aaabaa96c.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
ui/ariang/js/plugins-2104250bca.min.js → ui/ariang/js/plugins-bb70e85dac.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,18 @@ | ||
<!-- /** | ||
<!-- | ||
/** | ||
* @author Alex Hua | ||
* @date 2019.01.02 | ||
* | ||
* © Copyright 2019 Alex Hua | ||
*/ --><html><meta http-equiv="Content-Type" content="text/html;charset=utf-8"><head><style type="text/css">html, | ||
*/ | ||
--><html><meta http-equiv="Content-Type" content="text/html;charset=utf-8"><head><style type="text/css">html, | ||
body { | ||
border: 0px; | ||
margin: 0px; | ||
padding: 0px; | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 1) { | ||
#AriaNG { | ||
height: 580px; | ||
width: 790px; | ||
} | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 1.1) { | ||
#AriaNG { | ||
height: 540px; | ||
width: 710px; | ||
} | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 1.25) { | ||
#AriaNG { | ||
height: 465px; | ||
width: 640px; | ||
} | ||
} | ||
|
||
@media (-webkit-min-device-pixel-ratio: 1.5) { | ||
#AriaNG { | ||
height: 400px; | ||
width: 520px; | ||
} | ||
}</style></head><body><iframe id="AriaNG" src="index.html" frameborder="0" scrolling="no"></iframe></body></html> | ||
#AriaNG { | ||
height: 580px; | ||
width: 790px; | ||
}</style><script src="popup.js"></script></head><body><iframe id="AriaNG" src="index.html" frameborder="0" scrolling="no"></iframe></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
chrome && chrome.tabs.getZoomSettings(zoomSettings => { | ||
zoomFactor = zoomSettings.defaultZoomFactor || 1; | ||
const element = document.getElementById('AriaNG'); | ||
if (element && zoomFactor > 0 && zoomFactor != 1) { | ||
const adjustedWidth = Math.floor(element.offsetWidth / zoomFactor); | ||
const adjustedHeight = Math.floor(element.offsetHeight / zoomFactor); | ||
|
||
element.style.width = adjustedWidth + 'px'; | ||
element.style.height = adjustedHeight + 'px'; | ||
} | ||
}) |