Skip to content

Commit 5bdab23

Browse files
committed
Merge branch 'beta-branch'
2 parents 5a0b6a3 + 09d4a7a commit 5bdab23

File tree

268 files changed

+16684
-1005
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+16684
-1005
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.editorconfig
22
.eslintrc
33
pkg*.zip
4+
*-beta.zip
45
*.example
56
*.lock
67
build/

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ The sites used as search engines (IMDb, TMDb, and TVDb) will automatically creat
129129
<a href="https://chrome.google.com/webstore/detail/web-to-plex/cbpdknicmfolbdpakjihphblioajkcfl"><img alt="Get it for Chrome" src="badge.crx.png" /></a>
130130
<a href="https://addons.mozilla.org/en-US/firefox/addon/web-2-plex/"><img alt="Get it for Firefox" src="badge.moz.png" /></a>
131131
<a href="https://microsoftedge.microsoft.com/addons/detail/njkjmenckbpknhnepepbiikcjeboooon"><img alt="Get it for Edge" src="badge.win.png" /></a>
132+
<a href="https://addons.opera.com/extensions/details/web-to-plex/"><img alt="Get it for Opera" src="badge.opa.png" /></a>
132133

133134
### Install the source code (ZIP)
134135

135136
<a href="src.zip"><img alt="Get it for Chrome" src="badge.src.crx.png" /></a>
136137
<a href="moz.zip"><img alt="Get it for Firefox" src="badge.src.moz.png" /></a>
137138
<a href="win.zip"><img alt="Get it for Edge" src="badge.src.win.png" /></a>
139+
<a href="opa.zip"><img alt="Get it for Opera" src="badge.src.opa.png" /></a>
138140

139141
## Requirements
140142

badge.crx.png

3.79 KB
Loading

badge.moz.png

550 Bytes
Loading

badge.opa.png

6.41 KB
Loading

badge.src.crx.png

5.47 KB
Loading

badge.src.moz.png

765 Bytes
Loading

badge.src.opa.png

7.91 KB
Loading

badge.src.win.png

1.6 KB
Loading

badge.win.png

2.93 KB
Loading

moz.xpi

50.6 KB
Binary file not shown.

moz.zip

49.9 KB
Binary file not shown.

moz/background.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ async function UpdateConfiguration(force_update = false) {
159159
let configuration = load('configuration');
160160

161161
if(force_update || configuration === null || configuration === undefined)
162-
BACKGROUND_CONFIGURATION = await parseConfiguration();
162+
BACKGROUND_CONFIGURATION = configuration = await parseConfiguration();
163163
else
164164
BACKGROUND_CONFIGURATION = configuration;
165165

moz/common.css

+25
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@
150150

151151
.web-to-plex-prompt-body {
152152
background: #282828;
153+
border: 0 !important;
154+
border-radius: 3px !important;
153155
box-shadow: 0 5px 15px #0008 !important;
154156
display: block !important;
155157

@@ -278,6 +280,25 @@
278280
margin-top: 5px !important;
279281
}
280282

283+
.web-to-plex-permission:after {
284+
background: #0000;
285+
border-radius: 3px;
286+
border: 0;
287+
color: #cc7b19;
288+
content: "\29eb";
289+
display: inline-block;
290+
font-size: 150%;
291+
padding: 0;
292+
text-align: center;
293+
294+
margin: 0;
295+
position: absolute;
296+
right: 3%;
297+
298+
height: 2em;
299+
width: 2em;
300+
}
301+
281302
.web-to-plex-prompt-footer {
282303
text-align: right !important;
283304
border-bottom-left-radius: 3px !important;
@@ -505,6 +526,10 @@
505526
margin-top: 0 !important;
506527
}
507528

529+
.web-to-plex-button.hide.closed li:not(:first-child) {
530+
display: none !important;
531+
}
532+
508533
*:not(#plexit-bookmarklet-frame) + .web-to-plex-button.closed .list-item {
509534
float: left !important;
510535
opacity: 0;

moz/compare.js

+27-21
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,44 @@
1-
/** GitHub@alexey-bass
2-
* Simply compares two string version values.
1+
/** function compareVer({String|Number} L, {String|Number} R) => {Integer|Boolean};
2+
* Simply compares two version values.
33
*
4-
* Example:
4+
* Examples:
55
* compareVer('1.1', '1.2') => -1
66
* compareVer('1.1', '1.1') => 0
7-
* compareVer('1.2', '1.1') => 1
8-
* compareVer('2.23.3', '2.22.3') => 1
7+
* compareVer('1.2', '1.1') => +1
8+
* compareVer('2.23.3', '2.22.3') => +1
99
*
1010
* Returns:
11-
* -1 = left is LOWER = right is GREATER
12-
* 0 = they are equal
13-
* 1 = left is GREATER = right is LOWER
14-
* And FALSE if one of input versions are not valid
11+
* -1 => L < R: L is LOWER <-> R is HIGHER
12+
* 0 => L = R: L and R are EQUAL
13+
* +1 => L > R: L is HIGHER <-> R is LOWER
14+
* false => one of the versions is invalid
1515
*
1616
* @function
17-
* @param {String} left Version #1
18-
* @param {String} right Version #2
17+
* @param {String|Number} L Version #1
18+
* @param {String|Number} R Version #2
1919
* @return {Integer|Boolean}
20-
* @author Alexey Bass (albass)
21-
* @since 2011-07-14
20+
* @author Alexey Bass (GitHub@alexey-bass)
21+
* @since 2011-07-14
2222
*/
23-
function compareVer(left, right) {
24-
if(typeof left + typeof right != 'stringstring')
23+
function compareVer(L, R) {
24+
if(!/^(string|number)(string|number)$/i.test(typeof L + typeof R))
2525
return false;
2626

27-
for(let a = left.split('.'), b = right.split('.'), i = 0, l = Math.max(a.length, b.length); i < l; i++) {
28-
if((a[i] && !b[i] && parseInt(a[i]) > 0) || (parseInt(a[i]) > parseInt(b[i])))
27+
L += '';
28+
R += '';
29+
30+
let pI = Number.parseInt || parseInt || (string => +string.replace(/^\s*(-?\d+)[^]*$/, '$1')),
31+
mx = Math.max || ((...numbers) => numbers.sort((a, b) => +a < +b? +1: -1)[0]);
32+
33+
for(let a = L.split('.'), b = R.split('.'), i = 0, l = mx(a.length, b.length), p = pI; i < l; i++) {
34+
if((a[i] && !b[i] && p(a[i]) > 0) || (p(a[i]) > p(b[i])))
2935
return +1
30-
/* left is higher */;
31-
else if((b[i] && !a[i] && parseInt(b[i]) > 0) || (parseInt(a[i]) < parseInt(b[i])))
36+
/* L > R */;
37+
else if((b[i] && !a[i] && p(b[i]) > 0) || (p(a[i]) < p(b[i])))
3238
return -1
33-
/* right is higher */;
39+
/* L < R */;
3440
}
3541

3642
return 0
37-
/* equal */;
43+
/* L = R */;
3844
}

moz/foxsearchlight.png

19.7 KB
Loading

moz/go.png

4.25 KB
Loading

moz/kitsu.png

11 KB
Loading

moz/manifest.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "Web to Plex",
33
"description": "Adds a button on various movie & TV show sites to open the item in Plex, or send to your designated NZB manager for download.",
4-
"homepage_url": "https://github.com/SpaceK33z/web-to-plex/",
4+
"homepage_url": "https://webtoplex.github.io/",
55

66
"manifest_version": 2,
7-
"version": "4.1.1.9",
7+
"version": "4.1.1.11",
88
"browser_specific_settings": {
99
"gecko": {
1010
@@ -103,8 +103,8 @@
103103
"matches": ["*://itunes.apple.com/*"],
104104
"js": ["utils.js", "itunes$.js"]
105105
},{
106-
"matches": ["*://*.metacritic.com/*"],
107-
"js": ["utils.js", "metacritic$.js"]
106+
"matches": ["*://*.shanaproject.com/*"],
107+
"js": ["utils.js", "shanaproject$.js"]
108108
},{
109109
"matches": ["*://*.fandango.com/*"],
110110
"js": ["utils.js", "fandango$.js"]
@@ -154,7 +154,7 @@
154154
"matches": ["*://*.tubitv.com/*"],
155155
"js": ["utils.js", "tubi$.js"]
156156
},{
157-
"matches": ["*://ephellon.github.io/web.to.plex/?*", "*://ephellon.github.io/web.to.plex/index.html?*", "*://ephellon.github.io/web.to.plex/login.html?*"],
157+
"matches": ["*://webtoplex.github.io/web/*", "*://ephellon.github.io/web.to.plex/*"],
158158
"js": ["utils.js", "webtoplex$.js"]
159159
},{
160160
"matches": ["*://app.plex.tv/desktop/*"],

moz/metacritic$.js

-2
This file was deleted.

moz/metacritic.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ let script = {
2727

2828
case 'list':
2929
/* Not yet implemented */
30+
return -1;
3031
break;
3132

3233
default:
@@ -52,9 +53,10 @@ let script = {
5253

5354
if(!top.WaitingOnAbsoluteReady) {
5455
top.addEventListener('load', event => {
55-
top.AbsoluteReady = true;
56-
57-
$('.web-to-plex-button a.list-action').first.onclick = event => event;
56+
/* Fix event override? */
57+
setInterval(() => {
58+
top.AbsoluteReady = $('.web-to-plex-button').first.classList.contains('show');
59+
}, 1000);
5860
});
5961

6062
top.WaitingOnAbsoluteReady = true;

moz/myshows.png

3.15 KB
Loading

moz/options.css

+11-5
Original file line numberDiff line numberDiff line change
@@ -692,20 +692,26 @@ code[new], [code][new], [type^="code"i][new] {
692692

693693
/* Release is higher than GitHub */
694694
#version[status="high"] {
695-
border-color: #6cc644 !important;
696-
color: #6cc644 !important;
695+
/* Blue */
696+
border-color: #197bcc !important;
697+
color: #197bcc !important;
697698
}
698699

699700
/* Release is same as GitHub */
700701
#version[status="same"] {
701-
border-color: #197bcc !important;
702-
color: #197bcc !important;
702+
/* Green */
703+
border-color: #6cc644 !important;
704+
color: #6cc644 !important;
703705
}
704706

705707
/* Release is lower than GitHub */
706708
#version[status="low"] {
709+
/* Orange/Red (#f3582c) */
707710
border-color: #f66a0a !important;
708-
color: #f3582c !important;
711+
color: #f66a0a !important;
712+
/* Grey */
713+
/* border-color: #949494 !important;
714+
color: #949494 !important; */
709715
}
710716

711717
/* notifications */

moz/options.html

+22-24
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ <h3>Login <em>(saved)</em></h3>
154154
</section>
155155
<hr><br>
156156
<section>
157-
<button class="test" target="_blank" href="https://ephellon.github.io/web.to.plex/?movie=492">try out ombi</button>
157+
<button class="test" target="_blank" href="https://webtoplex.github.io/web/?movie=492">try out ombi</button>
158158
</section>
159159
</details>
160160

@@ -220,7 +220,7 @@ <h3>Login <em>(saved)</em></h3>
220220
</section>
221221
<hr><br>
222222
<section>
223-
<button class="test" target="_blank" href="https://ephellon.github.io/web.to.plex/?movie=492">try out watcher</button>
223+
<button class="test" target="_blank" href="https://webtoplex.github.io/web/?movie=492">try out watcher</button>
224224
</section>
225225
</details>
226226

@@ -286,7 +286,7 @@ <h3>Login <em>(saved)</em></h3>
286286
</section>
287287
<hr><br>
288288
<section>
289-
<button class="test" target="_blank" href="https://ephellon.github.io/web.to.plex/?movie=492">try out radarr</button>
289+
<button class="test" target="_blank" href="https://webtoplex.github.io/web/?movie=492">try out radarr</button>
290290
</section>
291291
</details>
292292

@@ -348,7 +348,7 @@ <h3>Login <em>(saved)</em></h3>
348348
</section>
349349
<hr><br>
350350
<section>
351-
<button class="test" target="_blank" href="https://ephellon.github.io/web.to.plex/?movie=492">try out couchpotato</button>
351+
<button class="test" target="_blank" href="https://webtoplex.github.io/web/?movie=492">try out couchpotato</button>
352352
</section>
353353
</details>
354354

@@ -420,7 +420,7 @@ <h3>Login <em>(saved)</em></h3>
420420
</section>
421421
<hr><br>
422422
<section>
423-
<button class="test" target="_blank" href="https://ephellon.github.io/web.to.plex/?tv=86831">try out medusa</button>
423+
<button class="test" target="_blank" href="https://webtoplex.github.io/web/?tv=86831">try out medusa</button>
424424
</section>
425425
</details>
426426

@@ -486,7 +486,7 @@ <h3>Login <em>(saved)</em></h3>
486486
</section>
487487
<hr><br>
488488
<section>
489-
<button class="test" target="_blank" href="https://ephellon.github.io/web.to.plex/?tv=86831">try out sonarr</button>
489+
<button class="test" target="_blank" href="https://webtoplex.github.io/web/?tv=86831">try out sonarr</button>
490490
</section>
491491
</details>
492492

@@ -560,7 +560,7 @@ <h3>Login <em>(saved)</em></h3>
560560
</section>
561561
<hr><br>
562562
<section>
563-
<button class="test" target="_blank" href="https://ephellon.github.io/web.to.plex/?tv=86831">try out Sick Beard</button>
563+
<button class="test" target="_blank" href="https://webtoplex.github.io/web/?tv=86831">try out Sick Beard</button>
564564
</section>
565565
</details>
566566
</article>
@@ -573,19 +573,17 @@ <h3>Login <em>(saved)</em></h3>
573573
<summary>Theme Settings</summary>
574574

575575
<h2>The Button</h2>
576-
<!--
577576
<section>
578577
What shape should the button be?
579578
<br>
580579
<span class="checkbox" prompt-size="large" prompt-yes="&#9723;" prompt-no="&#9675;">
581-
<!-- When true (checked), will be accessed in CSS (/sites/theme.css) as ".button-shape-box { ... }" --/>
580+
<!-- When true (checked), will be accessed in CSS (/sites/theme.css) as ".button-shape-box { ... }" -->
582581
<input data-option="theme:button-shape" theme="true:box" type="checkbox"/>
583582
<label for="theme:button-shape"></label>
584583
</span>
585584
</section>
586-
-->
587585
<section>
588-
Which direction should the button open (<span orange>&#9711;</span> only)?
586+
Which direction should the button open (&#9711; only)?
589587
<br>
590588
<span class="checkbox" prompt-size="large" prompt-yes="&#8672;" prompt-no="&#8674;">
591589
<!-- When true (checked), will be accessed in CSS (/sites/theme.css) as ".button-location-right { ... }" -->
@@ -700,8 +698,8 @@ <h3>
700698
<div>
701699
When the user presses the Grab button, the extension should:
702700
<ul>
703-
<li>Grab <em>ALL</em>: Find items not on Plex, and grab them</li>
704-
<li><em>ASK</em> user: Find items not on Plex, and grab what the user approves</li>
701+
<li>Grab <em>ALL</em> &mdash; Find items not on Plex, and grab them</li>
702+
<li><em>ASK</em> user &mdash; Find items not on Plex, and grab what the user approves</li>
705703
</ul>
706704
</div>
707705
<h3>Maximum Auto Grabs</h3>
@@ -805,7 +803,7 @@ <h3>
805803
Allows the extension to use your manager(s) to find media.<br>
806804
Currently supports: Medusa, Ombi, Radarr, and Sonarr.
807805
</div>
808-
</section>
806+
</section>
809807
<hr>
810808
<section>
811809
<h3>
@@ -816,8 +814,8 @@ <h3>
816814
</span>
817815
</h3>
818816
<ul>
819-
<li><em>MIN</em>: when a page is loaded, the extension will keep a small number of IDs on hand to speed up the process of finding media</li>
820-
<li><em>ALL</em>: when a page is loaded, the extension will ask for every single ID from your Manager(s)</li>
817+
<li><em>MIN</em> &mdash; when a page is loaded, the extension will keep a small number of IDs on hand to speed up the process of finding media</li>
818+
<li><em>ALL</em> &mdash; when a page is loaded, the extension will ask for every single ID from your Manager(s)</li>
821819
</ul>
822820
</section>
823821
</details>
@@ -853,19 +851,19 @@ <h3 x-mode>Data Compression</h3>
853851
<label for="use-lzw"></label>
854852
</div>
855853
<div>
856-
<em>WARNING</em>: may cause data loss.<br>
854+
<em>WARNING</em> &mdash; may cause data loss.<br>
857855
Enabling this option will compress your cached search data using the <a href="https://wikipedia.org/wiki/Burrows%E2%80%93Wheeler_transform" target="_blank">BWT (transform)</a> and <a href="https://wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch" target="_blank">LZW Compression Algorithm</a>.
858856
</div>
859857
</section>
860858
<hr>
861859
<section>
862860
<h3>Configuration Data (Copy/Paste)</h3>
863861
<input id="json_data" type="text" code placeholder="Enter your configuration data"/>
864-
<div>
865-
Use this for testing purposes only, as it may contain saved usernames and/or passwords.
866-
<br>
867-
You cannot use this feature with <strong>Data Compression</strong> enabled.
868-
</div>
862+
<div>
863+
Use this for testing purposes only, as it may contain saved usernames and/or passwords.
864+
<br>
865+
You cannot use this feature with <strong>Data Compression</strong> enabled.
866+
</div>
869867
<br>
870868
<button type="button" id="json_set">Generate Data</button>
871869
<button type="button" id="json_get">Restore Data</button>
@@ -893,7 +891,7 @@ <h3>
893891
</span>
894892
</h3>
895893
<div>
896-
<em>WARNING</em>: may cause data loss.<br>
894+
<em>WARNING</em> &mdash; may cause data loss.<br>
897895
Enables developer (debugging) mode, showing advance errors and logging to the console when possible.
898896
</div>
899897
</section>
@@ -907,7 +905,7 @@ <h3>
907905
<h2>External Links</h2>
908906
<section>
909907
<label>Web to Plex Links</label>
910-
<ul>
908+
<ul>
911909
<li>Browse the <a href="https://github.com/SpaceK33z/web-to-plex/wiki" target="_blank">Web to Plex Wiki</a> for help setting up</li>
912910
<li><a href="https://github.com/SpaceK33z/web-to-plex/issues" target="_blank">Browse issues</a> if you're having trouble</li>
913911
</ul>

0 commit comments

Comments
 (0)