-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Favorites are here! More info on releases
- Loading branch information
Showing
11 changed files
with
274 additions
and
62 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
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
File renamed without changes.
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,5 +1,11 @@ | ||
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"); | ||
|
||
/* Arc Palette */ | ||
:root { | ||
--arc-palette-background: #1c1a26 !important; | ||
} | ||
|
||
/* Peek */ | ||
div#peekpage { | ||
height: 100vh; | ||
width: 74vw; | ||
|
@@ -35,6 +41,11 @@ div#peekpage iframe { | |
animation: buttonappear 1s; | ||
background: white; | ||
color: black; | ||
transition: 0.1s; | ||
} | ||
|
||
.peektools:hover { | ||
background: #dbdbdb; | ||
} | ||
|
||
.peektools::after { | ||
|
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
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,10 +1,76 @@ | ||
<span>Peek tabs by pressing shift while clicking on a link</span> | ||
<input type="checkbox" name="" id="" /> | ||
<h3>General</h3> | ||
<span>Open a Peek window when clicking on links with Shift held</span> | ||
<input disabled type="checkbox" name="" id="" checked /> | ||
<h3>Favorites</h3> | ||
<span>Pin some tabs!</span> | ||
<div style="height: 10px"></div> | ||
<input type="text" id="f1" placeholder="Favorite 1..." /> | ||
<input type="text" id="f2" placeholder="Favorite 2..." /> | ||
<input type="text" id="f3" placeholder="Favorite 3..." /> | ||
<button id="btn">Save and <i>restart</i> ArcFox</button> | ||
<button id="save">Restart later</button> | ||
<style> | ||
* { | ||
user-select: none; | ||
} | ||
body { | ||
font-family: Arial; | ||
display: inline; | ||
background-color: #292d2d; | ||
font-family: Nunito; | ||
background-color: #1a1d25; | ||
color: white; | ||
padding: 10px; | ||
} | ||
@font-face { | ||
font-family: Nunito; | ||
src: URL("../fonts/Nunito-VariableFont_wght.ttf") format("truetype"); | ||
} | ||
h3 { | ||
margin: 15px 0 6px 0; | ||
padding: auto; | ||
} | ||
::selection { | ||
background-color: #565c78; | ||
} | ||
input { | ||
color: white; | ||
background: transparent; | ||
font-family: Nunito; | ||
font-size: 16px; | ||
padding: 8px; | ||
border-radius: 10px; | ||
border: 1px solid rgba(255, 255, 255, 0.398); | ||
transition: 0.2s; | ||
cursor: pointer; | ||
margin-bottom: 10px; | ||
} | ||
input:focus { | ||
scale: 0.98; | ||
outline: none; | ||
cursor: default; | ||
} | ||
button { | ||
background-color: rgb(93, 93, 130); | ||
color: white; | ||
padding: 10px; | ||
border: 0; | ||
border-radius: 10px; | ||
font-family: Nunito; | ||
font-size: 14px; | ||
font-weight: 800; | ||
cursor: pointer; | ||
transition: 0.1s; | ||
} | ||
button:hover { | ||
scale: 1.02; | ||
} | ||
button:active { | ||
scale: 0.98; | ||
} | ||
button#save { | ||
margin-top: 10px; | ||
background: transparent; | ||
color: rgba(255, 255, 255, 0.65); | ||
font-weight: 400; | ||
border: 1px solid rgba(255, 255, 255, 0.226); | ||
} | ||
</style> | ||
<script src="settings.js"></script> |
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,51 @@ | ||
browser.storage.local.get('favorites', function (result) { | ||
var favorites = result.favorites || [{ url: 'https://gmail.com', favicon: 'https://mailmeteor.com/logos/assets/PNG/Gmail_Logo_512px.png', id: 0 }, { url: 'https://music.youtube.com', favicon: 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Youtube_Music_icon.svg/2048px-Youtube_Music_icon.svg.png', id: 1 }]; | ||
// Sets the URLs | ||
[0, 1, 2].forEach(i => favorites[i] && (document.querySelector(`#f${i + 1}`).value = favorites[i].url)); | ||
}); | ||
|
||
document.querySelector('#btn').addEventListener('click', () => { | ||
saveSettings(); | ||
browser.windows.getAll({ populate: true }).then((windows) => { | ||
for (let window of windows) { | ||
browser.windows.remove(window.id); | ||
} | ||
}); | ||
browser.windows.create({}) | ||
}) | ||
|
||
document.querySelector('#save').addEventListener('click', () => { | ||
saveSettings(); | ||
browser.windows.getCurrent().then((window) => { | ||
browser.windows.remove(window.id) | ||
}) | ||
}) | ||
|
||
function saveSettings() { | ||
browser.storage.local.get('favorites', function (result) { | ||
var favoritesc = result.favorites || [{ url: 'https://gmail.com', favicon: 'https://mailmeteor.com/logos/assets/PNG/Gmail_Logo_512px.png', id: 0 }, { url: 'https://music.youtube.com', favicon: 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Youtube_Music_icon.svg/2048px-Youtube_Music_icon.svg.png', id: 1 }]; | ||
|
||
[0, 1, 2].forEach((i) => { | ||
if (favoritesc[i] == undefined) { | ||
if (document.querySelector('#f' + (i + 1)).value !== "") { | ||
favoritesc[i] = {} | ||
favoritesc[i].url = document.querySelector('#f' + (i + 1)).value | ||
favoritesc[i].favicon = 'https://i0.wp.com/www.flyycredit.com/wp-content/uploads/2018/06/globe-icon-white.png?fit=512%2C512&ssl=1'; | ||
favoritesc[i].id = i; | ||
} | ||
} else { | ||
if (document.querySelector('#f' + (i + 1)).value !== "" && document.querySelector('#f' + (i + 1)).value !== favoritesc[i].url) { | ||
favoritesc[i].url = document.querySelector('#f' + (i + 1)).value | ||
favoritesc[i].favicon = 'https://i0.wp.com/www.flyycredit.com/wp-content/uploads/2018/06/globe-icon-white.png?fit=512%2C512&ssl=1'; | ||
} | ||
} | ||
|
||
if (document.querySelector('#f' + (i + 1)).value == "") { | ||
delete favoritesc[i] | ||
} | ||
}) | ||
browser.storage.local.set({ | ||
favorites: favoritesc | ||
}); | ||
}) | ||
} |
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
Oops, something went wrong.