aboutsummaryrefslogtreecommitdiff
path: root/misc/piped-preferences.user.js
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2024-11-17 22:36:53 -0600
committerTim Keller <tjkeller.xyz>2024-11-17 22:36:53 -0600
commit6bb49cc16cbf03d4e0980c2343372ff20d0a4b55 (patch)
tree38b659a6081e639cce5bd4503886370a75c5c770 /misc/piped-preferences.user.js
parentd7484069764fe74654fe5e7721919462bc1286d2 (diff)
downloaduserscripts-6bb49cc16cbf03d4e0980c2343372ff20d0a4b55.tar.xz
userscripts-6bb49cc16cbf03d4e0980c2343372ff20d0a4b55.zip
rename all scripts to have .user.js ext
Diffstat (limited to 'misc/piped-preferences.user.js')
-rw-r--r--misc/piped-preferences.user.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/misc/piped-preferences.user.js b/misc/piped-preferences.user.js
new file mode 100644
index 0000000..a168418
--- /dev/null
+++ b/misc/piped-preferences.user.js
@@ -0,0 +1,43 @@
+// ==UserScript==
+// @name fill prefs piped
+// @namespace Violentmonkey Scripts
+// @match https://piped.tjkeller.xyz/*
+// @grant none
+// @version 1.0
+// @author tjkeller.xyz
+// @description 8/16/2024, 6:10:21 PM
+// ==/UserScript==
+
+// all skip options (if any are to be set) must be present to avoid player errors
+const skipOptionsDefault = {
+ sponsor: "auto",
+ intro: "no",
+ outro: "no",
+ preview: "no",
+ interaction: "auto",
+ selfpromo: "auto",
+ music_offtopic: "auto",
+ poi_highlight: "no",
+ filler: "no"
+}
+
+// fill localStorage { key: value } with preferred options
+// any preferences not filled will be default
+const prefs = {
+ bufferGoal: 30,
+ dearrow: true,
+ enabledCodecs: "avc",
+ homepage: "feed",
+ quality: 720,
+ showWatchOnYouTube: true,
+ watchHistory: true,
+ skipOptions: JSON.stringify({...skipOptionsDefault, ...{
+ intro: "auto",
+ poi_highlight: "button",
+ filler: "button",
+ }}),
+}
+
+// setup localStorage
+for (const [key, value] of Object.entries(prefs))
+ localStorage.setItem(key, value)