Skip to content

Commit bfae5be

Browse files
authored
Update x70tru7b.user.js
1 parent 539dee2 commit bfae5be

1 file changed

Lines changed: 47 additions & 36 deletions

File tree

userscripts/src/x70tru7b.user.js

Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name Trakt.tv | Partial VIP Unlock
3-
// @description Unlocks some vip features: adding titles to maxed-out lists, advanced filters, "more" buttons on dashboard, faster page navigation, bulk list management, rewatching, custom calendars, advanced list progress and more. Also hides some vip advertisements.
4-
// @version 2.0.5
3+
// @description Unlocks some vip features: advanced filters, "more" buttons on dashboard, faster page navigation, bulk list management, rewatching, custom calendars, advanced list progress and more. Also hides some vip advertisements.
4+
// @version 2.1.0
55
// @namespace x70tru7b
66
// @updateURL https://update.greasyfork.org/scripts/550079.meta.js
77
// @icon https://trakt.tv/assets/logos/logomark.square.gradient-b644b16c38ff775861b4b1f58c1230f6a097a2466ab33ae00445a505c33fcb91.svg
@@ -33,10 +33,6 @@
3333
- ***watch-now modal country selection***
3434
3535
### Partial Unlock
36-
- ***adding an item to maxed-out lists***<br>
37-
(See the "List Limits Bypass" section down below, it's kind of like the second example, just automated. So if you've got a list with >= 100 items,
38-
you can now directly add a new item to it using the regular ui elems. How long that takes depends on the size of that list, if it's 1000 items you're looking at about 45s until completion..
39-
Hefty, but it works. Mind you that this is very much experimental and I can only emphasize the importance of backups here.)
4036
- ***advanced filters***<br>
4137
(no saved filters, though you can always just save the url of a search with its specific parameters as a bookmark.. works all the same)
4238
- ***custom calendars***<br>
@@ -57,6 +53,33 @@ I've got a couple more Trakt.tv userscripts which replicate other vip features i
5753
5854
Though you can always just install the [Trakt.tv \| Megascript](zzzzzzzz.md) instead.
5955
56+
### Semi-Private Notes in Comments
57+
Trakt supports markdown syntax in comments, including reference-style links which you can misuse as a semi-private notes container like `[//]: # (hidden text goes here)`.
58+
The raw markdown is of course still accessible to anyone through the Trakt api and the `/comments/<comment-id>.json` endpoint (you yourself can also see the raw version when editing),
59+
but the content is not rendered in the classic and new web versions, in fact a comment can appear to be completely empty this way. I found this interesting because it's a relatively elegant way to
60+
work around the max. limit for private notes (currently 100), as the note-comments are still stored directly on your Trakt account on a per-title basis and can easily be accessed on arbitrary
61+
platforms, including ones that don't support userscripts. It's probably advisable to disguise the note-comments by always adding some generic one-liner.
62+
63+
### Filter-By-Terms Regex
64+
The filter-by-terms (also called "Filter by Title") function works either server or client-side, depending on whether the exact place you're using it from is paginated or not.
65+
The `/users/<userslug>/lists`, `/seasons` and `/people` pages are all not paginated, so there the filtering is done client-side, with the input being interpreted as a case-insensitive regular expression.
66+
All other places where the filter-by-terms function is available are paginated and therefore use server-side filtering, those usually don't allow for regular expressions, with the exception of
67+
the `/progress` page and list pages. The input is matched against:
68+
- list title and description for `/users/<userslug>/lists` pages
69+
- episode title for `/seasons` pages
70+
- title and character name for `/people` pages
71+
- episode and show title for `/progress` pages
72+
- title name for list pages
73+
*/
74+
75+
/* TODO
76+
@description Unlocks some vip features: adding titles to maxed-out lists,
77+
78+
- ***adding an item to maxed-out lists***<br>
79+
(See the "List Limits Bypass" section down below, it's kind of like the second example, just automated. So if you've got a list with >= 100 items,
80+
you can now directly add a new item to it using the regular ui elems. How long that takes depends on the size of that list, if it's 1000 items you're looking at about 45s until completion..
81+
Hefty, but it works. Mind you that this is very much experimental and I can only emphasize the importance of backups here.)
82+
6083
### List Limits Bypass
6184
Credit for this one goes to [SET19724](https://github.com/SET19724) who pointed out some inconsistencies with the unlocked bulk list actions in an issue.
6285
Turns out with those it's possible to bypass the imposed limits for both the number of lists and items per list:
@@ -76,23 +99,11 @@ You can grow lists to arbitrary(ish, at ~4100 items I get 400 responses) sizes b
7699
77100
Please don't draw any attention to this. I'd also suggest you make use of the [Trakt.tv \| Scheduled E-Mail Data Exports](2hc6zfyy.md) userscript, just in case.
78101
79-
### Semi-Private Notes in Comments
80-
Trakt supports markdown syntax in comments, including reference-style links which you can misuse as a semi-private notes container like `[//]: # (hidden text goes here)`.
81-
The raw markdown is of course still accessible to anyone through the Trakt api and the `/comments/<comment-id>.json` endpoint (you yourself can also see the raw version when editing),
82-
but the content is not rendered in the classic and new web versions, in fact a comment can appear to be completely empty this way. I found this interesting because it's a relatively elegant way to
83-
work around the max. limit for private notes (currently 100), as the note-comments are still stored directly on your Trakt account on a per-title basis and can easily be accessed on arbitrary
84-
platforms, including ones that don't support userscripts. It's probably advisable to disguise the note-comments by always adding some generic one-liner.
85102
86-
### Filter-By-Terms Regex
87-
The filter-by-terms (also called "Filter by Title") function works either server or client-side, depending on whether the exact place you're using it from is paginated or not.
88-
The `/users/<userslug>/lists`, `/seasons` and `/people` pages are all not paginated, so there the filtering is done client-side, with the input being interpreted as a case-insensitive regular expression.
89-
All other places where the filter-by-terms function is available are paginated and therefore use server-side filtering, those usually don't allow for regular expressions, with the exception of
90-
the `/progress` page and list pages. The input is matched against:
91-
- list title and description for `/users/<userslug>/lists` pages
92-
- episode title for `/seasons` pages
93-
- title and character name for `/people` pages
94-
- episode and show title for `/progress` pages
95-
- title name for list pages
103+
104+
restore "new list" creation function via regular button after limit is reached
105+
allow for bulk list copy to a new list with > 100 items
106+
allow for bulk list ops. with maxed out lists as target
96107
*/
97108

98109

@@ -129,15 +140,15 @@ const token = null; // atob(GM_info.script.icon.split(',')[1]).match(/<!-- (.*?)
129140

130141
addStyles();
131142

132-
document.addEventListener('click', (evt) => {
133-
const listBtnEl = evt.target.closest('.quick-icons .list, .btn-summary.btn-list, .btn-summary.btn-list .side-btn .icon-add'),
134-
popoverEl = evt.target.closest('.popover');
135-
if (listBtnEl && !popoverEl) {
136-
evt.stopPropagation();
137-
evt.preventDefault();
138-
addToListBtnOverride.call(listBtnEl);
139-
}
140-
}, { capture: true });
143+
// document.addEventListener('click', (evt) => {
144+
// const listBtnEl = evt.target.closest('.quick-icons .list, .btn-summary.btn-list, .btn-summary.btn-list .side-btn .icon-add'),
145+
// popoverEl = evt.target.closest('.popover');
146+
// if (listBtnEl && !popoverEl) {
147+
// evt.stopPropagation();
148+
// evt.preventDefault();
149+
// addToListBtnOverride.call(listBtnEl);
150+
// }
151+
// }, { capture: true });
141152

142153
document.addEventListener('turbo:load', async () => {
143154
$ ??= unsafeWindow.jQuery;
@@ -146,7 +157,7 @@ document.addEventListener('turbo:load', async () => {
146157
if (!$ || !compressedCache || !Cookies) return;
147158

148159

149-
unsafeWindow.actionList = addToListPopupOverride;
160+
// unsafeWindow.actionList = addToListPopupOverride;
150161
$('body').removeAttr('data-turbo');
151162
patchUserSettings();
152163
if (token) $('body:not(.dashboard) .feed-icon.csv').attr('href', location.pathname + '.csv?slurm=' + token + location.search.replace('?', '&'));
@@ -342,12 +353,12 @@ function addStyles() {
342353
.alert-vip-required {
343354
display: none !important;
344355
}
345-
346-
.popover:not(.copy-list) ul.lists li.maxed-out:not(.selected) {
347-
text-decoration: line-through dashed 2px;
348-
}
349356
`);
350357

358+
// .popover:not(.copy-list) ul.lists li.maxed-out:not(.selected) {
359+
// text-decoration: line-through dashed 2px;
360+
// }
361+
351362
const userslug = document.cookie.match(/(?:^|; )trakt_userslug=([^;]*)/)?.[1];
352363
if (userslug) {
353364
GM_addStyle(`

0 commit comments

Comments
 (0)