Skip to content

Commit

Permalink
eye view count icon
Browse files Browse the repository at this point in the history
  • Loading branch information
vinyashegde committed Oct 5, 2023
1 parent 43ce230 commit 1fab126
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions Source/eye-slash-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Source/eye-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Source/off-button.png
Binary file not shown.
Binary file removed Source/on-button.png
Binary file not shown.
2 changes: 1 addition & 1 deletion Source/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<div class="card-title h5">Shorto - URL Shorter</div> </div>
<div class="container">
<iframe src="https://ghbtns.com/github-btn.html?user=vinyashegde&repo=shorto_url_shorter&type=star&count=true" frameborder="0" scrolling="0" width="120" height="20" title="GitHub" id="github-icon"></iframe>
<img src="off-button.png" id="toggleBtn" width="32" height="32" style="cursor: pointer;"/>
<img src="eye-slash-solid.svg" id="toggleBtn" width="20" height="20" style="cursor: pointer; margin-top: 5px;"/>
</div>

<div class="card-body">
Expand Down
8 changes: 6 additions & 2 deletions Source/src/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,14 @@ const toggleViewCount = () => {
const img = document.querySelector(".container > img");
const viewCountInput = document.querySelector("#expiry-count");
if(viewCountEnabled){
img.src = "on-button.png";
img.src = "eye-solid.svg";
img.style.width = "20px";
img.style.height = "20px";
viewCountInput.style.display = "block";
}else{
img.src = "off-button.png";
img.src = "eye-slash-solid.svg";
img.style.width = "20px";
img.style.height = "20px";
viewCountInput.style.display = "none";
}
}
Expand Down

0 comments on commit 1fab126

Please sign in to comment.