-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge refactor branch with settings page (#50)
* move refactor changes from private repo * Update src/editors.ts Co-authored-by: Tommy MacWilliam <[email protected]> * inject script tag to documentElement, use mutationObserver for all DOM changes, not just the ReactDOM, shorten timeout for monaco listeners * remove stray print, remove alert for use on copy clickables and replace with div overlay * style fixes, simplify scroll command response logic * remove debug print statements * fix bug in test page and ace editor language determination * fix bug in codemirror language determination * Add popup and "Always Show Clickables" setting (#48) * add popup page and match styling to client * implement message passing between popup and background, store settings * first functional prototype * add missing await in message passing from content to injected script, don't return immediately if always show clickables is true * add show inputs and links, change UI phrasing * remove debug prints Co-authored-by: Tommy MacWilliam <[email protected]>
- Loading branch information
Showing
10 changed files
with
227 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ build | |
*.log | ||
.idea | ||
package-lock.json | ||
.vscode |
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 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 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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
html { | ||
min-width: 400px; | ||
} | ||
|
||
body { | ||
font-family: aktiv-grotesk, sans-serif; | ||
font-size: medium; | ||
color: #475569; | ||
text-align: center; | ||
padding-bottom: 1em; | ||
} | ||
|
||
h1 { | ||
font-size: medium; | ||
} | ||
|
||
a { | ||
color: #fff; | ||
background-color: rgb(59 130 246); | ||
display: inline-block; | ||
text-decoration: none; | ||
padding: 0.5em 1.5em; | ||
margin-bottom: 1em; | ||
font-weight: normal; | ||
text-align: center; | ||
vertical-align: middle; | ||
border-radius: 1em; | ||
box-shadow: 0 4px 6px -1px #3b82f688; | ||
} | ||
|
||
a:hover { | ||
background-color: rgb(37 99 235); | ||
box-shadow: 0 4px 6px -1px #3b82f688; | ||
} | ||
|
||
/* The switch - the box around the slider */ | ||
.switch { | ||
--width: 40px; | ||
--height: calc(var(--width) / 1.8); | ||
position: relative; | ||
display: inline-block; | ||
width: var(--width); | ||
height: var(--height); | ||
vertical-align: middle; | ||
} | ||
|
||
/* Hide default HTML checkbox */ | ||
.switch input { | ||
opacity: 0; | ||
width: 0; | ||
height: 0; | ||
} | ||
|
||
/* The slider */ | ||
.slider { | ||
position: absolute; | ||
cursor: pointer; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
background-color: rgb(29 78 216); | ||
} | ||
|
||
.slider:before { | ||
position: absolute; | ||
content: ""; | ||
height: calc(0.8 * var(--height)); | ||
width: calc(0.8 * var(--height)); | ||
top: calc(0.1 * var(--height)); | ||
left: calc(0.1 * var(--height)); | ||
border-radius: calc(var(--height) / 2); | ||
background-color: #fff; | ||
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3); | ||
} | ||
|
||
input:checked + .slider { | ||
background-color: rgb(59 130 246); | ||
} | ||
|
||
input:focus + .slider { | ||
box-shadow: 0 0 1px rgb(59 130 246); | ||
} | ||
|
||
input:checked + .slider:before { | ||
transform: translateX(calc(var(--width) - var(--height))); | ||
} | ||
|
||
/* Rounded sliders */ | ||
.slider.round { | ||
border-radius: var(--height); | ||
} |
Oops, something went wrong.