-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fully cross-browser templates (#196)
- Loading branch information
1 parent
fecf8fe
commit d34b3c6
Showing
275 changed files
with
1,324 additions
and
1,553 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
File renamed without changes.
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
if ( | ||
process.env.EXTENSION_PUBLIC_BROWSER === 'firefox' || | ||
process.env.EXTENSION_PUBLIC_BROWSER === 'firefox-based' | ||
) { | ||
document.getElementById('title').textContent = chrome.i18n.getMessage('title') | ||
document.getElementById('learnMore').textContent = | ||
chrome.i18n.getMessage('learnMore') | ||
} else { | ||
document.getElementById('title').textContent = chrome.i18n.getMessage('title') | ||
document.getElementById('learnMore').textContent = | ||
chrome.i18n.getMessage('learnMore') | ||
} |
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,35 @@ | ||
html { | ||
font-size: 62.5%; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, | ||
'Helvetica Neue', Arial, 'Noto Sans', sans-serif; | ||
} | ||
|
||
body { | ||
width: 300px; | ||
height: 100%; | ||
padding: 1rem; | ||
font-size: 1.35rem; | ||
line-height: 1.618; | ||
color: #c9c9c9; | ||
background-color: #0A0C10; | ||
} | ||
|
||
h1 { | ||
line-height: 1.1; | ||
font-weight: 700; | ||
font-size: 2.7em; | ||
margin-bottom: 1.5rem; | ||
} | ||
|
||
a { | ||
text-decoration: none; | ||
border-bottom: 2px solid #c9c9c9; | ||
color: #e5e7eb; | ||
} | ||
|
||
img { | ||
height: auto; | ||
max-width: 100%; | ||
margin-top: 1rem; | ||
margin-bottom: 1.5rem; | ||
} |
File renamed without changes
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
2 changes: 1 addition & 1 deletion
2
examples/locales/package.json → examples/action-locales/package.json
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,11 +1 @@ | ||
function getManifest() { | ||
return chrome.runtime.getManifest() | ||
} | ||
|
||
const manifestData = getManifest() | ||
|
||
console.table({ | ||
name: manifestData.name, | ||
version: manifestData.version, | ||
description: manifestData.description | ||
}) | ||
console.log('Hello from the browser action page!') |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log('Hello from the background 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,5 @@ | ||
.content_logo { | ||
width: 72px; | ||
background: #c9c9c9; | ||
border-radius: 6px; | ||
} |
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,23 @@ | ||
import './styles.css' | ||
import styles from './Logo.module.css' | ||
import logo from '../images/logo.png' | ||
|
||
console.log('hello from content_scripts') | ||
|
||
document.body.innerHTML += ` | ||
<div class="content_script"> | ||
<img class=${styles.content_logo} src="${logo}" /> | ||
<h1 class="content_title"> | ||
Welcome to your CSS Modules Extension | ||
</h1> | ||
<p class="content_description"> | ||
Learn more about creating cross-browser extensions at <a | ||
className="underline hover:no-underline" | ||
href="https://extension.js.org" | ||
target="_blank" | ||
> | ||
https://extension.js.org | ||
</a> | ||
</p> | ||
</div> | ||
` |
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,33 @@ | ||
.content_script { | ||
color: #c9c9c9; | ||
background-color: #0a0c10; | ||
position: fixed; | ||
right: 0; | ||
bottom: 0; | ||
z-index: 9; | ||
width: 315px; | ||
margin: 1rem; | ||
padding: 2rem 1rem; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1em; | ||
border-radius: 6px; | ||
} | ||
|
||
.content_title { | ||
font-size: 1.85em; | ||
line-height: 1.1; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, | ||
'Helvetica Neue', Arial, 'Noto Sans', sans-serif; | ||
font-weight: 700; | ||
} | ||
|
||
.content_description { | ||
font-size: small; | ||
} | ||
|
||
.content_description a { | ||
text-decoration: none; | ||
border-bottom: 2px solid #c9c9c9; | ||
color: #e5e7eb; | ||
} |
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.