Skip to content

Commit

Permalink
Cleaned the clutter and more
Browse files Browse the repository at this point in the history
  • Loading branch information
GuiMar10 authored Aug 21, 2024
2 parents 0883455 + 726a161 commit 3464049
Show file tree
Hide file tree
Showing 25 changed files with 37 additions and 105 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/web-ext-artifacts
6 changes: 6 additions & 0 deletions src/components/peek/peek.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ div#peekpage iframe {
border: 0;
margin-bottom: -5px;
}

.peektools {
border-radius: 100px;
border: 0;
Expand All @@ -35,6 +36,11 @@ div#peekpage iframe {
background: white;
color: black;
}

.peektools::after {
content: attr(id);
}

.peektools#open_in_full {
margin-top: 60px;
}
Expand Down
9 changes: 1 addition & 8 deletions src/components/peek/peek.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ var peekIframe = document.createElement("iframe");
var tools = [{ name: 'close' }, { name: 'open_in_full' }]
tools.forEach((tool) => {
var btn = document.createElement('button');
btn.innerHTML = tool.name
btn.className = 'peektools'
btn.id = tool.name
if (tool.name == 'close') {
Expand Down Expand Up @@ -45,21 +44,15 @@ peekPage.appendChild(peekIframe);
// Make peek functional in Anchor elements
let collection = document.getElementsByTagName("a");
Array.from(collection).forEach(function (element) {
var oldhref = element.href;
element.href = "javascript:;";
element.removeAttribute("jsaction");
element.removeAttribute("target");
element.onclick = (event) => {
if (event.shiftKey) {
event.preventDefault();
peekIframe.src = oldhref;
peekIframe.src = element.href;
peekBackdrop.style.display = 'block';
document.body.style.overflow = 'hidden';
peekPage.showPopover();
} else {
if (element.href == "javascript:;") {
element.href = oldhref
}
}
};
});
10 changes: 10 additions & 0 deletions src/components/settings/settings.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<span>Peek tabs by pressing shift while clicking on a link</span>
<input type="checkbox" name="" id="" />
<style>
body {
font-family: Arial;
display: inline;
background-color: #292d2d;
color: white;
}
</style>
1 change: 0 additions & 1 deletion src/components/sidebar/easel-build/_app/env.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3464049

Please sign in to comment.