-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from dnorhoj/Qeolvdxu/main
Qeolvdxu/main
- Loading branch information
Showing
6 changed files
with
256 additions
and
177 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
{ | ||
"content_scripts": [ | ||
{ | ||
"js": ["content.js"], | ||
"matches": ["https://*.youtube.com/*"], | ||
"run_at": "document_start" | ||
} | ||
], | ||
"name": "AntiRickRoll", | ||
"version": "1.3", | ||
"description": "Never gonna rickroll you, never gonna let you get rickrolled.", | ||
"manifest_version": 2, | ||
"web_accessible_resources": [ | ||
"warn/warn.html" | ||
], | ||
"permissions": [ | ||
"storage" | ||
], | ||
"icons": { | ||
"16": "icons/icon16.png", | ||
"48": "icons/icon48.png", | ||
"128": "icons/icon128.png" | ||
} | ||
} | ||
"content_scripts": [ | ||
{ | ||
"js": ["content.js"], | ||
"matches": ["https://*.youtube.com/*"], | ||
"run_at": "document_start" | ||
} | ||
], | ||
"name": "AntiRickRoll", | ||
"version": "1.4", | ||
"description": "Never gonna rickroll you, never gonna let you get rickrolled.", | ||
"manifest_version": 3, | ||
"web_accessible_resources": [ | ||
{ | ||
"resources": ["warn/warn.html"], | ||
"matches": ["<all_urls>"] | ||
} | ||
], | ||
"permissions": [ | ||
"storage" | ||
], | ||
"action": { | ||
"default_popup": "popup/popup.html" | ||
}, | ||
"icons": { | ||
"16": "icons/icon16.png", | ||
"48": "icons/icon48.png", | ||
"128": "icons/icon128.png" | ||
} | ||
} |
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,56 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<style> | ||
body { | ||
--google-gray-700: rgb(95, 99, 104); | ||
background: #fff; | ||
color: var(--google-gray-700); | ||
font-family: 'Segoe UI', Tahoma, sans-serif; | ||
font-size: 75%; | ||
} | ||
|
||
.brand { | ||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
padding-top: .3125rem; | ||
padding-bottom: 1rem; | ||
font-size: 1rem; | ||
text-decoration: none; | ||
white-space: nowrap; | ||
font-weight: bold; | ||
color: rgb(51, 51, 51); | ||
} | ||
|
||
.brand img { | ||
height: 32px; | ||
width: 32px; | ||
vertical-align: middle; | ||
} | ||
|
||
#toggler { | ||
transition: ease 100ms; | ||
width: 100%; | ||
font-weight: bold; | ||
background: #fff; | ||
border: solid 1px; | ||
border-radius: 10px; | ||
padding: 10px; | ||
cursor: pointer; | ||
} | ||
|
||
#toggler:hover { | ||
transition: ease 100ms; | ||
background-color: #aaa; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="brand"> | ||
<img src="/icons/icon48.png" alt="Logo"> AntiRickRoll | ||
</div> | ||
<button id="toggler"></button> | ||
|
||
<script src="popup.js"></script> | ||
</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,16 @@ | ||
(() => { | ||
let toggler = document.querySelector('#toggler') | ||
let update = () => { | ||
chrome.storage.local.get(['disabled'], (result) => { | ||
toggler.innerHTML = !result.disabled ? "Disable" : "Enable" | ||
}); | ||
} | ||
|
||
update() | ||
|
||
toggler.addEventListener('click', () => { | ||
chrome.storage.local.get(['disabled'], (res) => { | ||
chrome.storage.local.set({"disabled": !res.disabled}, update) | ||
}); | ||
}) | ||
})(); |
Oops, something went wrong.