Skip to content

Commit 3dd1836

Browse files
committed
Update
1 parent 8828749 commit 3dd1836

3 files changed

Lines changed: 63 additions & 78 deletions

File tree

improve-adult-experience.user.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
// @name Improve Adult Experience
33
// @description Skip intros, set better default quality/duration filters, make unwanted video previews transparent, workaround load failures, make input more consistent across the websites. Designed for a separate browser profile. Supported websites: pornhub.com, xvideos.com, anysex.com, spankbang.com, porntrex.com, txxx.com, xnxx.com, xhamster.com, vxxx.com
44
// @icon https://external-content.duckduckgo.com/ip3/pornhub.com.ico
5-
// @version 0.46
5+
// @version 0.47
66
// @downloadURL https://userscripts.codonaft.com/improve-adult-experience.user.js
7+
// @grant GM_addStyle
78
// ==/UserScript==
89

910
(_ => {
@@ -172,18 +173,12 @@ const init = (args = {}) => {
172173
onNodeChange,
173174
} = { ...defaultArgs, ...args };
174175

175-
try {
176-
const style = document.createElement('style');
177-
style.innerHTML = `
178-
.${HIDE} { display: none !important }
179-
.${UNWANTED} { opacity: 10% !important }
180-
.${UNWANTED}:hover { opacity: 40% !important }
181-
${MINOR_IMPROVEMENTS && css ? css : ''}
182-
`;
183-
body.appendChild(style);
184-
} catch (e) {
185-
console.error(e);
186-
}
176+
GM_addStyle(`
177+
.${HIDE} { display: none !important }
178+
.${UNWANTED} { opacity: 10% !important }
179+
.${UNWANTED}:hover { opacity: 40% !important }
180+
${MINOR_IMPROVEMENTS && css ? css : ''}
181+
`);
187182

188183
let searchInputInitialized = false;
189184
let initializedVideo = false;

metasearch-hacks.user.js

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// ==UserScript==
22
// @name Hacks for the cute metasearch engine https://github.com/mat-1/metasearch2
3-
// @version 0.6
3+
// @version 0.7
44
// @downloadURL https://userscripts.codonaft.com/metasearch-hacks.user.js
5+
// @grant GM_addStyle
56
// ==/UserScript==
67

78
(_ => {
@@ -33,37 +34,31 @@ if (REDIRECT_ON_FAILURE && q && imageResults.length === 0 && !body.querySelector
3334
const DARK = '__dark';
3435
const HIDE = '__hide';
3536
const LARGE = '__large';
36-
try {
37-
const style = document.createElement('style');
38-
style.innerHTML = `
39-
.${DARK} {
40-
display: block !important;
41-
opacity: 0.18;
42-
}
43-
.${HIDE} { display: none !important }
44-
.${LARGE} {
45-
height: 30rem !important;
46-
object-fit: contain !important;
47-
}
48-
`;
49-
body.appendChild(style);
37+
GM_addStyle(`
38+
.${DARK} {
39+
display: block !important;
40+
opacity: 0.18;
41+
}
42+
.${HIDE} { display: none !important }
43+
.${LARGE} {
44+
height: 30rem !important;
45+
object-fit: contain !important;
46+
}
47+
`);
5048

51-
if (SEARXNG_BUTTON) {
52-
const redirectButton = document.createElement('input');
53-
redirectButton.type = 'submit';
54-
redirectButton.value = 'SearXNG';
55-
body.querySelector('form.search-form')?.appendChild(redirectButton);
49+
if (SEARXNG_BUTTON) {
50+
const redirectButton = document.createElement('input');
51+
redirectButton.type = 'submit';
52+
redirectButton.value = 'SearXNG';
53+
body.querySelector('form.search-form')?.appendChild(redirectButton);
5654

57-
const progressUpdates = body.querySelector('div.progress-updates');
58-
redirectButton?.addEventListener('mouseenter', _ => progressUpdates?.classList.add(DARK));
59-
redirectButton?.addEventListener('mouseleave', _ => progressUpdates?.classList.remove(DARK));
60-
redirectButton?.addEventListener('click', event => {
61-
event.preventDefault();
62-
redirectToSearxng(body.querySelector('input#search-input')?.value || q);
63-
}, true);
64-
}
65-
} catch (e) {
66-
console.error(e);
55+
const progressUpdates = body.querySelector('div.progress-updates');
56+
redirectButton?.addEventListener('mouseenter', _ => progressUpdates?.classList.add(DARK));
57+
redirectButton?.addEventListener('mouseleave', _ => progressUpdates?.classList.remove(DARK));
58+
redirectButton?.addEventListener('click', event => {
59+
event.preventDefault();
60+
redirectToSearxng(body.querySelector('input#search-input')?.value || q);
61+
}, true);
6762
}
6863

6964
if (FIX_IMAGES) {

planka-dark-theme.user.js

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
// @name Dark Theme for Planka
33
// @description Redirect to a random SearXNG instance in case of error and empty result
44
// @icon https://external-content.duckduckgo.com/ip3/planka.cloud.ico
5-
// @version 0.1
5+
// @version 0.2
66
// @downloadURL https://userscripts.codonaft.com/planka-dark-theme.user.js
7+
// @grant GM_addStyle
78
// ==/UserScript==
89

910
(_ => {
@@ -12,43 +13,37 @@
1213
if (performance.getEntriesByType('navigation')[0]?.responseStatus !== 200) return;
1314
if (window.location.hostname !== 'localhost' || !document.head?.querySelector('meta[name="description"]')?.content?.startsWith('Planka ')) return;
1415

15-
try {
16-
const style = document.createElement('style');
17-
style.innerHTML = `
18-
div[class^="Card_name__"] {
19-
color: #ccc !important;
20-
}
21-
div[class^="List_headerName__"], div[class^="List_outerWrapper__"] {
22-
color: #eee !important;
23-
background: #333 !important;
24-
background-color: #333 !important;
25-
span {
26-
color: #fff !important;
27-
background: #222 !important;
28-
background-color: #222 !important;
29-
}
30-
}
31-
button[class^="List_addCardButton__"] {
32-
color: #eee !important;
33-
background: #333 !important;
34-
background-color: #333 !important;
35-
span {
36-
color: #fff !important;
37-
background: #333 !important;
38-
background-color: #333 !important;
39-
}
40-
}
41-
i, textarea, span, button, div[class^="CardModal_headerWrapper__"], div[class^="Card_details__"], div[class^="ui grid CardModal_grid__"], div[class^="CardModal_moduleHeader__"], div[class^="Activities_moduleHeader__"], div.markdown-body pre {
16+
GM_addStyle(`
17+
div[class^="Card_name__"] {
18+
color: #ccc !important;
19+
}
20+
div[class^="List_headerName__"], div[class^="List_outerWrapper__"] {
21+
color: #eee !important;
22+
background: #333 !important;
23+
background-color: #333 !important;
24+
span {
4225
color: #fff !important;
4326
background: #222 !important;
4427
background-color: #222 !important;
4528
}
46-
div[class^="Card_card__"] {
47-
box-shadow: 0 1px 0 #000000;
29+
}
30+
button[class^="List_addCardButton__"] {
31+
color: #eee !important;
32+
background: #333 !important;
33+
background-color: #333 !important;
34+
span {
35+
color: #fff !important;
36+
background: #333 !important;
37+
background-color: #333 !important;
4838
}
49-
`;
50-
document.body.appendChild(style);
51-
} catch (e) {
52-
console.error(e);
53-
}
39+
}
40+
i, textarea, span, button, div[class^="CardModal_headerWrapper__"], div[class^="Card_details__"], div[class^="ui grid CardModal_grid__"], div[class^="CardModal_moduleHeader__"], div[class^="Activities_moduleHeader__"], div.markdown-body pre {
41+
color: #fff !important;
42+
background: #222 !important;
43+
background-color: #222 !important;
44+
}
45+
div[class^="Card_card__"] {
46+
box-shadow: 0 1px 0 #000000;
47+
}
48+
`);
5449
})();

0 commit comments

Comments
 (0)