Skip to content

Commit 83787d9

Browse files
committed
deploy: 73e0d38
1 parent 4032bbb commit 83787d9

15 files changed

Lines changed: 249 additions & 53 deletions

File tree

externalUpload/plugin.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -228,25 +228,25 @@ shelter.plugin.scoped.ui.injectCss(`.-bMcgq_uploadArea {
228228
}
229229
`);
230230
var modal_jsx_default = {
231-
"progressFill": "-bMcgq_progressFill",
232-
"uploading": "-bMcgq_uploading",
233-
"dashboardButton": "-bMcgq_dashboardButton",
234-
"dashboardItem": "-bMcgq_dashboardItem",
235-
"previewIcon": "-bMcgq_previewIcon",
231+
"previewArea": "-bMcgq_previewArea",
232+
"previewItemInfo": "-bMcgq_previewItemInfo",
233+
"previewImage": "-bMcgq_previewImage",
234+
"removeButton": "-bMcgq_removeButton",
236235
"previewItem": "-bMcgq_previewItem",
236+
"uploading": "-bMcgq_uploading",
237+
"previewVideo": "-bMcgq_previewVideo",
237238
"uploadModal": "-bMcgq_uploadModal",
238-
"uploadArea": "-bMcgq_uploadArea",
239-
"previewItemInfo": "-bMcgq_previewItemInfo",
240-
"progressBar": "-bMcgq_progressBar",
241239
"footer": "-bMcgq_footer",
242-
"previewArea": "-bMcgq_previewArea",
243-
"sway": "-bMcgq_sway",
244-
"replacedButton": "-bMcgq_replacedButton",
245240
"shake": "-bMcgq_shake",
246-
"removeButton": "-bMcgq_removeButton",
247-
"previewVideo": "-bMcgq_previewVideo",
241+
"sway": "-bMcgq_sway",
242+
"progressFill": "-bMcgq_progressFill",
248243
"dragOver": "-bMcgq_dragOver",
249-
"previewImage": "-bMcgq_previewImage"
244+
"progressBar": "-bMcgq_progressBar",
245+
"dashboardItem": "-bMcgq_dashboardItem",
246+
"uploadArea": "-bMcgq_uploadArea",
247+
"dashboardButton": "-bMcgq_dashboardButton",
248+
"replacedButton": "-bMcgq_replacedButton",
249+
"previewIcon": "-bMcgq_previewIcon"
250250
};
251251

252252
//#endregion

externalUpload/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"External Upload","description":"Boot too big? Upload it somewhere else!","author":"xirreal","hash":"f45e1ebf9c6bc51e959a4f476de27a99"}
1+
{"name":"External Upload","description":"Boot too big? Upload it somewhere else!","author":"xirreal","hash":"33754aab03df974413a7c70c9a5f0b54"}

favoriteSearch/plugin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ shelter.plugin.scoped.ui.injectCss(`#AgMsVW_searchBar {
131131
}
132132
`);
133133
var index_jsx_default = {
134-
"counter": "AgMsVW_counter",
135-
"align": "AgMsVW_align",
134+
"searchBar": "AgMsVW_searchBar",
136135
"barContainer": "AgMsVW_barContainer",
137-
"searchBar": "AgMsVW_searchBar"
136+
"counter": "AgMsVW_counter",
137+
"align": "AgMsVW_align"
138138
};
139139

140140
//#endregion

favoriteSearch/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"Favorite GIF Search","description":"Search for your favorite GIFs!","author":"xirreal","hash":"2b62267f14ac7a81de63ac037dd2a43e"}
1+
{"name":"Favorite GIF Search","description":"Search for your favorite GIFs!","author":"xirreal","hash":"632f0ba4b1d8416b16ab51fe09bd3ab4"}

hiddenChannels/plugin.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ shelter.plugin.scoped.ui.injectCss(`.ccAoOa_hiddenChannel > div > div > svg > pa
109109
}
110110
`);
111111
var style_default = {
112-
"topicWrapper": "ccAoOa_topicWrapper",
112+
"channelTitle": "ccAoOa_channelTitle",
113113
"mainBody": "ccAoOa_mainBody",
114-
"topic": "ccAoOa_topic",
114+
"headerBar": "ccAoOa_headerBar",
115115
"bold": "ccAoOa_bold",
116-
"channelTitle": "ccAoOa_channelTitle",
116+
"topicModal": "ccAoOa_topicModal",
117+
"topic": "ccAoOa_topic",
117118
"hiddenChannel": "ccAoOa_hiddenChannel",
118-
"divider": "ccAoOa_divider",
119-
"headerBar": "ccAoOa_headerBar",
120-
"topicModal": "ccAoOa_topicModal"
119+
"topicWrapper": "ccAoOa_topicWrapper",
120+
"divider": "ccAoOa_divider"
121121
};
122122

123123
//#endregion

hiddenChannels/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"Hidden Channels","description":"Allows you to see the name and description of channels you don't have actually access to.","author":"xirreal","hash":"3817813d861e6069d4e7a960277f1a88"}
1+
{"name":"Hidden Channels","description":"Allows you to see the name and description of channels you don't have actually access to.","author":"xirreal","hash":"022f4440e35dc02e62e153b73e236abb"}

index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

installButton/plugin.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,17 @@ shelter.plugin.scoped.ui.injectCss(`.eeurUa_card {
133133
}
134134
`);
135135
var index_jsx_default = {
136-
"author": "eeurUa_author",
137-
"title": "eeurUa_title",
138136
"header": "eeurUa_header",
139-
"content": "eeurUa_content",
140-
"copyLink": "eeurUa_copyLink",
141-
"card": "eeurUa_card",
137+
"title": "eeurUa_title",
142138
"description": "eeurUa_description",
143-
"copied": "eeurUa_copied",
144-
"alignRight": "eeurUa_alignRight",
139+
"divider": "eeurUa_divider",
145140
"icon": "eeurUa_icon",
146-
"divider": "eeurUa_divider"
141+
"author": "eeurUa_author",
142+
"content": "eeurUa_content",
143+
"alignRight": "eeurUa_alignRight",
144+
"copied": "eeurUa_copied",
145+
"copyLink": "eeurUa_copyLink",
146+
"card": "eeurUa_card"
147147
};
148148

149149
//#endregion

installButton/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"Install Button","description":"Allows you to use OneClick™ to install plugins, and gives plugins inside the app a nice embed.","author":"xirreal","hash":"81237a60124919f089245322a0a8b225"}
1+
{"name":"Install Button","description":"Allows you to use OneClick™ to install plugins, and gives plugins inside the app a nice embed.","author":"xirreal","hash":"94672791a65a7583e4f7b826195fbdaa"}

needForSpeed/plugin.js

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
(function(exports) {
2+
3+
//#region rolldown:runtime
4+
var __create = Object.create;
5+
var __defProp = Object.defineProperty;
6+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7+
var __getOwnPropNames = Object.getOwnPropertyNames;
8+
var __getProtoOf = Object.getPrototypeOf;
9+
var __hasOwnProp = Object.prototype.hasOwnProperty;
10+
var __commonJS = (cb, mod) => function() {
11+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12+
};
13+
var __copyProps = (to, from, except, desc) => {
14+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
15+
key = keys[i];
16+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17+
get: ((k) => from[k]).bind(null, key),
18+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19+
});
20+
}
21+
return to;
22+
};
23+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24+
value: mod,
25+
enumerable: true
26+
}) : target, mod));
27+
28+
//#endregion
29+
30+
//#region solid-js/web
31+
var require_web = __commonJS({ "solid-js/web"(exports, module) {
32+
module.exports = shelter.solidWeb;
33+
} });
34+
35+
//#endregion
36+
//#region plugins/needForSpeed/icon.jsx
37+
var import_web$7 = __toESM(require_web(), 1);
38+
var import_web$8 = __toESM(require_web(), 1);
39+
const _tmpl$$1 = /*#__PURE__*/ (0, import_web$7.template)(`<svg xmlns="http://www.w3.org/2000/svg" height="25px" viewBox="0 -960 960 960" width="25px" fill="currentColor"><path d="m426-330 195-125q14-9 14-25t-14-25L426-630q-15-10-30.5-1.5T380-605v250q0 18 15.5 26.5T426-330ZM121-440q17 0 30.5 11t18.5 28q6 23 14.5 43.5T204-317q9 15 7.5 32T198-256q-11 11-27 10t-25-14q-22-31-37-66.5T86-400q-3-16 7.5-28t27.5-12Zm77-264q12 12 13 29t-7 31q-11 20-19.5 41T170-559q-5 17-18.5 28T121-520q-17 0-27.5-12.5T87-561q8-38 23-73.5t36-66.5q9-13 25-13.5t27 10.5Zm56 505q12-13 29.5-14t32.5 8q20 11 40.5 20t42.5 15q17 5 28 18t11 30q0 17-12.5 27T397-88q-38-8-71.5-23T260-146q-14-9-15.5-25t9.5-28Zm186-639q0 17-10.5 30T402-790q-23 6-44 14.5T317-755q-15 9-32.5 7.5T255-761q-12-12-10.5-28.5T260-815q32-20 66.5-34.5T399-872q16-3 28.5 7t12.5 27Zm360 358q0-113-69.5-199.5T553-792q-15-4-24-17t-9-29q0-16 11-26.5t25-7.5q140 28 232 137t92 255q0 146-92 255T556-88q-14 3-25-7.5T520-122q0-16 9-29t24-17q108-26 177.5-112.5T800-480Z"></path></svg>`, 4);
40+
function SpeedIcon() {
41+
return (0, import_web$8.getNextElement)(_tmpl$$1);
42+
}
43+
44+
//#endregion
45+
//#region plugins/needForSpeed/index.jsx.scss
46+
shelter.plugin.scoped.ui.injectCss(`._4OA9Bq_icon {
47+
cursor: pointer;
48+
color: var(--interactive-text-default);
49+
background: none;
50+
border: none;
51+
justify-content: center;
52+
align-items: center;
53+
padding: 0 6px 0 4px;
54+
display: flex;
55+
}
56+
57+
._4OA9Bq_icon:hover {
58+
color: var(--interactive-text-hover);
59+
}
60+
61+
._4OA9Bq_selectorWrapper {
62+
z-index: 1000;
63+
padding-bottom: 12px;
64+
position: absolute;
65+
bottom: 100%;
66+
transform: translateX(-25%)translateY(8px);
67+
}
68+
69+
._4OA9Bq_selector {
70+
background: var(--opacity-black-80);
71+
border: 1px solid var(--border-subtle);
72+
backdrop-filter: blur(4px);
73+
border-radius: 8px;
74+
min-width: 60px;
75+
padding: 4px;
76+
overflow: hidden;
77+
}
78+
79+
._4OA9Bq_item {
80+
cursor: pointer;
81+
color: var(--interactive-text-default);
82+
text-align: center;
83+
border-radius: 4px;
84+
align-items: center;
85+
padding: 6px 12px;
86+
}
87+
88+
._4OA9Bq_item:hover {
89+
color: var(--interactive-text-hover);
90+
background-color: var(--border-subtle);
91+
}
92+
93+
._4OA9Bq_item._4OA9Bq_active {
94+
color: var(--interactive-text-active);
95+
background: var(--brand-50a);
96+
font-weight: bold;
97+
}
98+
`);
99+
var index_jsx_default = {
100+
"active": "_4OA9Bq_active",
101+
"item": "_4OA9Bq_item",
102+
"selectorWrapper": "_4OA9Bq_selectorWrapper",
103+
"selector": "_4OA9Bq_selector",
104+
"icon": "_4OA9Bq_icon"
105+
};
106+
107+
//#endregion
108+
//#region plugins/needForSpeed/index.jsx
109+
var import_web = __toESM(require_web(), 1);
110+
var import_web$1 = __toESM(require_web(), 1);
111+
var import_web$2 = __toESM(require_web(), 1);
112+
var import_web$3 = __toESM(require_web(), 1);
113+
var import_web$4 = __toESM(require_web(), 1);
114+
var import_web$5 = __toESM(require_web(), 1);
115+
var import_web$6 = __toESM(require_web(), 1);
116+
const _tmpl$ = /*#__PURE__*/ (0, import_web.template)(`<div><div></div></div>`, 4), _tmpl$2 = /*#__PURE__*/ (0, import_web.template)(`<div class="nfs-speed-control"><button></button><!#><!/></div>`, 6), _tmpl$3 = /*#__PURE__*/ (0, import_web.template)(`<div><!#><!/>x</div>`, 4);
117+
const { plugin: { scoped: { observeDom } }, solid: { createSignal, Show, onCleanup } } = shelter;
118+
const CONTROLS_QUERY = `[class*=videoControls]:not([data-nfs])`;
119+
const CONTROLS_QUERY_UNLOAD = `[class*=videoControls][data-nfs]`;
120+
function SpeedControlComponent({ videoRef }) {
121+
const [speed, setSpeed] = createSignal(videoRef?.playbackRate || 1);
122+
const [showMenu, setShowMenu] = createSignal(false);
123+
const speeds = [
124+
.5,
125+
.75,
126+
1,
127+
1.25,
128+
1.5,
129+
2
130+
];
131+
const selectSpeed = (newSpeed) => {
132+
setSpeed(newSpeed);
133+
if (videoRef) videoRef.playbackRate = newSpeed;
134+
setShowMenu(false);
135+
};
136+
return (() => {
137+
const _el$ = (0, import_web$4.getNextElement)(_tmpl$2), _el$2 = _el$.firstChild, _el$5 = _el$2.nextSibling, [_el$6, _co$] = (0, import_web$1.getNextMarker)(_el$5.nextSibling);
138+
_el$.addEventListener("mouseenter", () => setShowMenu(true));
139+
_el$.addEventListener("mouseleave", () => setShowMenu(false));
140+
(0, import_web$5.insert)(_el$2, (0, import_web$6.createComponent)(SpeedIcon, {}));
141+
(0, import_web$5.insert)(_el$, (0, import_web$6.createComponent)(Show, {
142+
get when() {
143+
return showMenu();
144+
},
145+
get children() {
146+
const _el$3 = (0, import_web$4.getNextElement)(_tmpl$), _el$4 = _el$3.firstChild;
147+
(0, import_web$5.insert)(_el$4, () => speeds.map((s) => (() => {
148+
const _el$7 = (0, import_web$4.getNextElement)(_tmpl$3), _el$9 = _el$7.firstChild, [_el$0, _co$2] = (0, import_web$1.getNextMarker)(_el$9.nextSibling), _el$8 = _el$0.nextSibling;
149+
_el$7.addEventListener("click", () => selectSpeed(s));
150+
(0, import_web$5.insert)(_el$7, s, _el$0, _co$2);
151+
(0, import_web$3.effect)(() => (0, import_web$2.className)(_el$7, `${index_jsx_default.item} ${s === speed() ? index_jsx_default.active : ""}`));
152+
return _el$7;
153+
})()));
154+
(0, import_web$3.effect)((_p$) => {
155+
const _v$ = index_jsx_default.selectorWrapper, _v$2 = index_jsx_default.selector;
156+
_v$ !== _p$._v$ && (0, import_web$2.className)(_el$3, _p$._v$ = _v$);
157+
_v$2 !== _p$._v$2 && (0, import_web$2.className)(_el$4, _p$._v$2 = _v$2);
158+
return _p$;
159+
}, {
160+
_v$: undefined,
161+
_v$2: undefined
162+
});
163+
return _el$3;
164+
}
165+
}), _el$6, _co$);
166+
(0, import_web$3.effect)(() => (0, import_web$2.className)(_el$2, index_jsx_default.icon));
167+
return _el$;
168+
})();
169+
}
170+
function patchVideoControls(element) {
171+
if (element.dataset.nfs) return;
172+
element.dataset.nfs = true;
173+
const volumeButton = element.querySelector("[class*=volumeButton]").parentElement.parentElement;
174+
const videoElement = element.parentElement.parentElement.querySelector("video");
175+
const speedControl = (0, import_web$6.createComponent)(SpeedControlComponent, { videoRef: videoElement });
176+
element.insertBefore(speedControl, volumeButton);
177+
}
178+
function onLoad() {
179+
document.querySelectorAll(CONTROLS_QUERY).forEach(patchVideoControls);
180+
observeDom(CONTROLS_QUERY, patchVideoControls);
181+
}
182+
function onUnload() {
183+
document.querySelectorAll(CONTROLS_QUERY_UNLOAD).forEach((element) => {
184+
element.removeAttribute("data-nfs");
185+
});
186+
document.querySelectorAll(".nfs-speed-control").forEach((element) => {
187+
element.remove();
188+
});
189+
}
190+
191+
//#endregion
192+
exports.onLoad = onLoad
193+
exports.onUnload = onUnload
194+
return exports;
195+
})({});

0 commit comments

Comments
 (0)