Skip to content

Commit fa9257b

Browse files
authored
Update 2dz6ub1t.user.js
1 parent cdb4f1d commit fa9257b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

userscripts/src/2dz6ub1t.user.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @name Trakt.tv | Custom Profile Image
33
// @description A custom profile image for free users. Like the vip feature, except this one only works locally. Uses the native set/reset buttons and changes the dashboard + settings background as well.
4-
// @version 1.1.3
4+
// @version 1.1.4
55
// @namespace 2dz6ub1t
66
// @updateURL https://update.greasyfork.org/scripts/557303.meta.js
77
// @icon https://trakt.tv/assets/logos/logomark.square.gradient-b644b16c38ff775861b4b1f58c1230f6a097a2466ab33ae00445a505c33fcb91.svg
@@ -24,12 +24,14 @@ const logger = {
2424
_defaults: {
2525
title: GM_info.script.name.replace('Trakt.tv', 'Userscript'),
2626
toast: true,
27-
toastrOpt: { positionClass: 'toast-top-right', timeOut: 8000, progressBar: true },
27+
toastrOpt: { positionClass: 'toast-top-right', timeOut: 10000, progressBar: true },
28+
toastrStyles: '#toast-container#toast-container a { color: #fff !important; border-bottom: dotted 1px #fff; }',
2829
},
2930
_print(fnConsole, fnToastr, msg = '', opt = {}) {
30-
const { data, title = this._defaults.title, consoleStyles, toast = this._defaults.toast, toastrOpt } = opt;
31-
console[fnConsole](`%c${title}: ${msg}`, consoleStyles ?? '', ...(data !== undefined ? [data] : []));
32-
if (toast) toastr[fnToastr](msg + (data !== undefined ? ' See console for details.' : ''), title, { ...this._defaults.toastrOpt, ...toastrOpt });
31+
const { title = this._defaults.title, toast = this._defaults.toast, toastrOpt, toastrStyles = '', consoleStyles = '', data } = opt,
32+
fullToastrMsg = `${msg}${data !== undefined ? ' See console for details.' : ''}<style>${this._defaults.toastrStyles + toastrStyles}</style>`;
33+
console[fnConsole](`%c${title}: ${msg}`, consoleStyles, ...(data !== undefined ? [data] : []));
34+
if (toast) toastr[fnToastr](fullToastrMsg, title, { ...this._defaults.toastrOpt, ...toastrOpt });
3335
},
3436
info(msg, opt) { this._print('info', 'info', msg, opt) },
3537
success(msg, opt) { this._print('info', 'success', msg, { consoleStyles: 'color:#00c853;', ...opt }) },

0 commit comments

Comments
 (0)