Skip to content

Commit 4a4f919

Browse files
committed
add an option to disable the extension on windows platforms
1 parent b9c4ed6 commit 4a4f919

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ubermanu/roller",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"license": "MIT",
55
"description": "Browser extension that allow auto scrolling of web pages, by pressing the mouse wheel button",
66
"keywords": [

src/components/OptionsPage.svelte

+8
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@
107107
</label>
108108
</div>
109109
</div>
110+
<div class="field">
111+
<div class="control">
112+
<label class="checkbox">
113+
<input type="checkbox" bind:checked={$options.disableOnWindows} />{' '}
114+
{$_('Disable on Windows platform')}
115+
</label>
116+
</div>
117+
</div>
110118
</section>
111119
<section class="section">
112120
<div class="buttons">

src/contentScript.js

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const autoScroll = new AutoScroll()
77

88
// TODO: Restore listener on option changes
99
chrome?.storage?.local.get(defaults, (options) => {
10+
if (navigator.platform === 'Win32' && options.disableOnWindows) {
11+
return
12+
}
1013
autoScroll.$$set({ options })
1114
htmlNode.appendChild(autoScroll)
1215
})

src/defaultOptions.js

+1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ export default {
1010
shouldCap: false,
1111
ctrlClick: true,
1212
middleClick: true,
13+
disableOnWindows: true,
1314
}

src/i18n/fr.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"Advanced": "Avancé",
1717
"Scroll on inner elements": "Défiler dans les éléments intérieurs",
1818
"Scroll when clicking on a link or textarea": "Défiler si un lien ou un champ text est cliqué",
19+
"Disable on Windows platform": "Désactiver sur Windows",
1920
"Save": "Enregistrer",
2021
"Reset": "Réinitialiser"
2122
}

0 commit comments

Comments
 (0)