From c7bb0b89567dcb2900702f8d5bd9f19609c67599 Mon Sep 17 00:00:00 2001 From: and94x Date: Fri, 12 Aug 2022 21:41:38 +0200 Subject: [PATCH] added build script for ff, fixed a bug and did some more shit --- .idea/artifacts/chrome.xml | 2 +- .idea/artifacts/firefox.xml | 9 --- README.md | 6 +- base/contextMenuHandler.js | 0 base/popup/popup.html | 5 +- base/script.js | 67 +++++++++++++-------- base/stammtv-bitty.png | Bin 0 -> 3677 bytes base/stammtv-large.png | Bin 0 -> 16051 bytes base/stammtv-small.png | Bin 0 -> 6619 bytes build-ff.sh | 15 +++++ chrome/manifest.json | 5 ++ firefox/manifest.json | 9 ++- out/artifacts/chrome/manifest.json | 5 ++ out/artifacts/chrome/popup/popup.html | 5 +- out/artifacts/chrome/script.js | 59 ++++++++++++++---- out/artifacts/firefox/base.iml | 8 --- out/artifacts/firefox/firefox.iml | 8 --- out/artifacts/firefox/manifest.json | 17 ------ out/artifacts/firefox/options/options.html | 21 ------- out/artifacts/firefox/options/options.js | 32 ---------- out/artifacts/firefox/popup/popup.html | 11 ---- out/artifacts/firefox/popup/popup.js | 7 --- out/artifacts/firefox/script.js | 58 ------------------ 23 files changed, 134 insertions(+), 215 deletions(-) delete mode 100644 .idea/artifacts/firefox.xml create mode 100644 base/contextMenuHandler.js create mode 100644 base/stammtv-bitty.png create mode 100644 base/stammtv-large.png create mode 100644 base/stammtv-small.png create mode 100644 build-ff.sh delete mode 100644 out/artifacts/firefox/base.iml delete mode 100644 out/artifacts/firefox/firefox.iml delete mode 100644 out/artifacts/firefox/manifest.json delete mode 100644 out/artifacts/firefox/options/options.html delete mode 100644 out/artifacts/firefox/options/options.js delete mode 100644 out/artifacts/firefox/popup/popup.html delete mode 100644 out/artifacts/firefox/popup/popup.js delete mode 100644 out/artifacts/firefox/script.js diff --git a/.idea/artifacts/chrome.xml b/.idea/artifacts/chrome.xml index 791b24b..0b9454c 100644 --- a/.idea/artifacts/chrome.xml +++ b/.idea/artifacts/chrome.xml @@ -1,5 +1,5 @@ - + $PROJECT_DIR$/out/artifacts/chrome diff --git a/.idea/artifacts/firefox.xml b/.idea/artifacts/firefox.xml deleted file mode 100644 index d7e47f3..0000000 --- a/.idea/artifacts/firefox.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - $PROJECT_DIR$/out/artifacts/firefox - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index 8ace007..2a4dcdf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ ## Build - +```shell +cd base; find base -type f -exec zip out/artifacts/firefox/extension.crx {} + +find firefox -type f -exec zip out/artifacts/firefox/extension.crx {} + +zip -r out/artifacts/firefox/extension.crx base/* firefox/* +``` ## Prerequisites - Chromium based Browser (Chrome, Edge, ..) diff --git a/base/contextMenuHandler.js b/base/contextMenuHandler.js new file mode 100644 index 0000000..e69de29 diff --git a/base/popup/popup.html b/base/popup/popup.html index 281016f..56ff8e3 100644 --- a/base/popup/popup.html +++ b/base/popup/popup.html @@ -4,8 +4,9 @@ Popup - -→ Take me to StammTV! + +→ Take me to StammTV! +⚙ Settings \ No newline at end of file diff --git a/base/script.js b/base/script.js index 5a13e93..18b8f50 100644 --- a/base/script.js +++ b/base/script.js @@ -1,45 +1,64 @@ +let WEBSOCKET_URL = ""; +let websocket; +const CONTEXT_MENU_ID = "STAMMTV_ADD_URL_TO_PLAYLIST"; + chrome.storage.local.get('firstRun', function (result) { + console.log(result); if (result.firstRun === false) { - firstRun(); + chrome.storage.local.set({'firstRun': false}, function (result) { + openSettings(); + }); + } else { + chrome.storage.local.get(['baseURL', 'wssURL'], function (items) { + if (items.wssURL !== undefined && items.wssURL.startsWith('wss://')) { + WEBSOCKET_URL = items.wssURL; + handleValidityCheckResult(true) + } + }); } }); -function firstRun(){ - chrome.storage.local.set({'firstRun': false}, function (result) { - chrome.tabs.create - }); - +function openSettings() { + chrome.tabs.create({ + active: true, + url: 'options/options.html' + }, null); } -const CONTEXT_MENU_ID = "STAMMTV_ADD_URL_TO_PLAYLIST"; -const YOUTUBE_URL_REGEX = /^(?:https?:\/\/(?:www\.)?youtu(?:\.be\/|be\.com\/watch\?v=|be\.com\/shorts\/)){1}([^#&?]*)(?:[?&]t=\d+)?.*/; - -let WEBSOCKET_URL = ""; -let websocket; - - -chrome.storage.local.get('wssURL', function (result) { - WEBSOCKET_URL = result.wssURL; -}); +function handleValidityCheckResult(validSettings) { + if (validSettings) { + addContextMenuItem(); + } else { + openSettings(); + } +} -chrome.contextMenus.create({ - title: "Zu StammTV Playlist hinzufügen...", - contexts: ["link"], - id: CONTEXT_MENU_ID -}); +function addContextMenuItem() { + chrome.contextMenus.removeAll(function() { + chrome.contextMenus.create({ + title: "Zu StammTV Playlist hinzufügen...", + contexts: ["link"], + id: CONTEXT_MENU_ID + }); + }); -chrome.contextMenus.onClicked.addListener(addToStammTV); + chrome.contextMenus.onClicked.addListener(addToStammTV); +} function parseYoutubeURL(url) { + const YOUTUBE_URL_REGEX = /^(?:https?:\/\/(?:www\.)?youtu(?:\.be\/|be\.com\/watch\?v=|be\.com\/shorts\/)){1}([^#&?]*)(?:[?&]t=\d+)?.*/; + let match = url.match(YOUTUBE_URL_REGEX); return (match && match[1].length === 11) ? match[1] : false; } + + function addToStammTV(info, tab) { if (info.menuItemId === CONTEXT_MENU_ID) { //if OUR menu item was clicked let videoId = parseYoutubeURL(info.linkUrl) if (videoId) { - const playerReady = {"type":"playerReady"}; + const playerReady = {"type": "playerReady"}; const setVideo = { type: "setVideo", @@ -69,4 +88,4 @@ function addToStammTV(info, tab) { console.error('o(一︿一+)o not a valid videoId'); } } -} \ No newline at end of file +} diff --git a/base/stammtv-bitty.png b/base/stammtv-bitty.png new file mode 100644 index 0000000000000000000000000000000000000000..50ca34284cf15249d50e83e9b7d9819d2d8d9e0f GIT binary patch literal 3677 zcmcgv32+nF85We $Lj8Ss>ijEy0z_LNq;wXlUHusxP>Y!eI(1FPL9dB>7g-CfHv z&~gO`nG#5xYYZi&ZXIwi3FDch7=yVIJ59k9C`Szh3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#G)ogKV@63>N2p+hvGFX=pezmuGldI+m9ac7wugGjcN?1^2SPyU z!NMS~@bGj7ifS`@6xomP!JtnPB6W&|0%Gj2iZupub$<~qFi_DzGK|AjnI++QVg+8!Bi< zyxdToV;Zq$@X+@+)2&l0y(3>-{tcbg^%=i=PGiFA+{TIR1)3@0@LTU>?ELlVkA~gE zwr6`gXS`R}Ht*enm$T}zPiHmXYkT{-+v3gI?2g89kZ>QSWxg0)E90PWr-5%O-sH^LhBPW%+we{Q1*Z5z}yODovU$|w| zw0>^?7mN!04lW%>}a_K@pSrhkm?*GJnqP}LiHwX9qE z`mG5cEK%*B@9IcOKd^1Ylnyj|u{-7XruU}2mY;T{^NXw5r|+@Lu3fox_qTM~$wIYy z^o_Q&!Fub^{I8FmPJ6{l?w!@d%uh^Raqi3Y$JB`*4tzU%%JG9;NKL}#qg$4>A5S?l zpz}&=c~cGV)@nE04(&YmtE-{I*$bM!ck%Wg4jq{MyS*drV9_4#!tCp~w`of#81X&Eo)1VmuvRg{pl~JSlW{ZWhZT3_CmsXa>1s9e?D>E)N!Z% zXoKlc>;5Cj3s#<*{Cw(DBOUXye>i5uioadY+A#b~`0VeUjVl%n<~O$d^;*c5cHche zqOcTeH0(_2zs&K{fI9q-%-2RDb>&z0T7BQF{c_Uf460;&{>V$|KX0oGF4^0RTkf4& wFzNdF3RB&mKFs}mUQ>H#sPaJ8>6E2e?s1gT?96{t|BsjFEOcz2wqW_c02L+ZIsgCw literal 0 HcmV?d00001 diff --git a/base/stammtv-large.png b/base/stammtv-large.png new file mode 100644 index 0000000000000000000000000000000000000000..241939ac07fe56ca65bdac8f9e300ffb40d892ff GIT binary patch literal 16051 zcmch;1yozhzBr6~3&m-%qD2A;?oy;sT!LE&!3qR-mr@*x7mBsG6?eDdEl?=#Uflgl z&pG$Jd%tzxdv|^E&sxdeGxM9D%j}u#FjeJOk8qyiAR!?=l9!WKM_m1Xf3YwSzg=RG zLBs{wN&VGJq_PppZA1gjLQ+W*38^9m_Z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KsVtH73WW=yO$L@s`fc=(@Y_#w1H&@92eu;&c b?g9S<{@Hc=_>}DTo8$5_%F<;oO#=Tfsk})F literal 0 HcmV?d00001 diff --git a/base/stammtv-small.png b/base/stammtv-small.png new file mode 100644 index 0000000000000000000000000000000000000000..939cdf7cf8b16921a2326b297ba2a379c7097587 GIT binary patch literal 6619 zcmcgx2{@G9+ecZly@)I&(@;cXcC%QDp(r$=>}gi!wal0qYZ+xJMM=pnODR!85n6~+ zRF)`NGNmL^h!&&xo{4&Uzw2GPzU4pHH8an-&+pvZ`Q7(9*UUkp{U$kS4QUY(5jh)c zO9$W^CVWdt0H4lc(+7YrQI5kV3z3qR6~n+_vA4OMxrj(vqRbbPI51wqvUcT&h{!Az zzC}ecvebYFafXu%*Tv2jPht8SlBi5F%`nuT1)xPlOxB08NEBZh7euCcGXhM(V^?dz zAO_VG?2NX9*|7*TABJ@}o8}m9??egrrQoRG^=5L?CZTvhgFlT+0)_hf1#s}8rr>Xi z@xZfC307rXX$$}b78i&GWu(%9n07$5oL}mtYO~HW2^P%{&e&`P1EaVHw z95j@~g2D}9!qC0}sgxf$RuJ3on+H@1l;%hCrv-3102clO3uMdA?g#uY)%yGYKy$cO z!GK2#0sbYL;}piCK^!3Y=v4uQiV2#gZ~iATfmNQ?mtj)%eKp>_aEsU$AxXD|W+gFC^o zcmxa&NBs%Rq%!DX{|cp2@N_2Ip9Jh3!=L0$gR%m=zge@h!`lRKxTF9I&BoFc47h5@ zU{LXJG8%)S0HnuZVJHZSf(h zL-0rh%!rPm;UF{`k_Mq-P;dyDN`gaRNE)4tgTai9Fr@F=wz3&Oxs&{U)++Rh3TVV) z=rjt6jD%oGRFtq(=@1ePC@DA`jwVsjI3x^(0)zgrOJMpj*>+4SkaHv$B;0U3pdN6Q zBrGvgFnmGiB4n#y(7X_XfB`QkT==;#@A@zEe@t%=U;rsbfI&ja;J?{-1lkzjfDsyv zL@&sRj8K}NizNfd8fV@S?4PDw|J&5JMkDMxCf}+RZ_VH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5@P&G#0s2d92+ zqLX8+-uRTSN^8kEx7xUV@&q=dJi{&1E*rb2=Q;weW4D+8<}F&zaEt2LlSd5)6LZ$H zqDGE5Crw-|;0_c-Q;Qhy(__^Mh1MtHW{@4)Z5EYr0v;-BJYHL}Ih3b)R<*BqDM5P6 z;okkzv==9pRwdtC(rhlJYTUh8;_c_EgBz0@zwSW2Oifz4#zDmO)^-tPfa~MJzs`D_TsY4}a$%*#`{yGr@v@?}bIx@>i?*Cz042hrgpy3n>unIXo# z8Fqc0>!sh!RMx8~NKaLS^lngJo|&z_Yx1;!Lq$A?>AE3FT>^y@RgS{1 zt-gJR4`F>v&0r>zFL5>ro2vx{lmqQ#E<3O$)74LHb;*qSvzU4 zGPfLVFU{9mUM}xonU;bl%9NEq)zjsck&^wS3i?_9hs9}8&j!hcfD|j{6e#IhjnTeWu^KTbsuEQ3Z@+?R)^z^4vKfzr&hfL z&KuikYY+4R1CQLN%VPSaTZiV>Bp7HK# zCj?5vnt3(!owZHZj7?S>tqCHPl&xPtsWUVXbymC3F*>@(;q!S#{hma}oTUGeFQq5_!*Wj1F^$8}zK5c&GV z=GL=jOZVv46-IpMt$AD|=skMthRiD2C6~(e=`H+QoXQqpKi`JUtJ{DCqxWImS-i%Fuk+`u6Bjl>%)KE;Z!(Ni%ZimNv zUXk5qVjJ(QdM1Y_oKD#y^|jL}Xy2tIh z?=9e0Dvin!|B>eF1vmBJQAuSFj;E@o<;88^+%sP7E|{B0T#`SxDCdT~(za9m>cW3m NY^>}pODuLp{TBc+#(n?* literal 0 HcmV?d00001 diff --git a/build-ff.sh b/build-ff.sh new file mode 100644 index 0000000..660ca52 --- /dev/null +++ b/build-ff.sh @@ -0,0 +1,15 @@ +#!/usr/bin/bash +PWD=$(pwd) +BASE_DIR=${PWD}/base +MANIFEST_DIR=${PWD}/firefox +OUT="../out/artifacts/firefox/extension.zip" + +echo $BASE_DIR +echo $MANIFEST_DIR +echo $OUT + +rm -f ${OUT} +cd "$BASE_DIR" || return +zip -r ${OUT} * +cd "${MANIFEST_DIR}" || return +zip -r ${OUT} manifest.json \ No newline at end of file diff --git a/chrome/manifest.json b/chrome/manifest.json index df26515..bd4be07 100644 --- a/chrome/manifest.json +++ b/chrome/manifest.json @@ -13,5 +13,10 @@ ], "action": { "default_popup": "popup/popup.html" + }, + "icons": { + "16": "stammtv-bitty.png", + "48": "stammtv-small.png", + "128": "stammtv-large.png" } } \ No newline at end of file diff --git a/firefox/manifest.json b/firefox/manifest.json index bcaa621..30261ba 100644 --- a/firefox/manifest.json +++ b/firefox/manifest.json @@ -4,7 +4,9 @@ "version": "1.0", "manifest_version": 2, "background": { - "scripts": ["script.js"] + "scripts": [ + "script.js" + ] }, "options_page": "options/options.html", "permissions": [ @@ -13,5 +15,10 @@ ], "action": { "default_popup": "popup/popup.html" + }, + "icons": { + "16": "icon-bitty.png", + "48": "icon-small.png", + "128": "icon-large.png" } } \ No newline at end of file diff --git a/out/artifacts/chrome/manifest.json b/out/artifacts/chrome/manifest.json index df26515..bd4be07 100644 --- a/out/artifacts/chrome/manifest.json +++ b/out/artifacts/chrome/manifest.json @@ -13,5 +13,10 @@ ], "action": { "default_popup": "popup/popup.html" + }, + "icons": { + "16": "stammtv-bitty.png", + "48": "stammtv-small.png", + "128": "stammtv-large.png" } } \ No newline at end of file diff --git a/out/artifacts/chrome/popup/popup.html b/out/artifacts/chrome/popup/popup.html index 281016f..56ff8e3 100644 --- a/out/artifacts/chrome/popup/popup.html +++ b/out/artifacts/chrome/popup/popup.html @@ -4,8 +4,9 @@ Popup - -→ Take me to StammTV! + +→ Take me to StammTV! +⚙ Settings \ No newline at end of file diff --git a/out/artifacts/chrome/script.js b/out/artifacts/chrome/script.js index 343fe03..18b8f50 100644 --- a/out/artifacts/chrome/script.js +++ b/out/artifacts/chrome/script.js @@ -1,31 +1,64 @@ -const CONTEXT_MENU_ID = "STAMMTV_ADD_URL_TO_PLAYLIST"; -const YOUTUBE_URL_REGEX = /^(?:https?:\/\/(?:www\.)?youtu(?:\.be\/|be\.com\/watch\?v=|be\.com\/shorts\/)){1}([^#&?]*)(?:[?&]t=\d+)?.*/; let WEBSOCKET_URL = ""; - let websocket; +const CONTEXT_MENU_ID = "STAMMTV_ADD_URL_TO_PLAYLIST"; -chrome.storage.local.get('wssURL', function (result) { - WEBSOCKET_URL = result.wssURL; +chrome.storage.local.get('firstRun', function (result) { + console.log(result); + if (result.firstRun === false) { + chrome.storage.local.set({'firstRun': false}, function (result) { + openSettings(); + }); + } else { + chrome.storage.local.get(['baseURL', 'wssURL'], function (items) { + if (items.wssURL !== undefined && items.wssURL.startsWith('wss://')) { + WEBSOCKET_URL = items.wssURL; + handleValidityCheckResult(true) + } + }); + } }); -chrome.contextMenus.create({ - title: "Zu StammTV Playlist hinzufügen...", - contexts: ["link"], - id: CONTEXT_MENU_ID -}); +function openSettings() { + chrome.tabs.create({ + active: true, + url: 'options/options.html' + }, null); +} + +function handleValidityCheckResult(validSettings) { + if (validSettings) { + addContextMenuItem(); + } else { + openSettings(); + } +} -chrome.contextMenus.onClicked.addListener(addToStammTV); +function addContextMenuItem() { + chrome.contextMenus.removeAll(function() { + chrome.contextMenus.create({ + title: "Zu StammTV Playlist hinzufügen...", + contexts: ["link"], + id: CONTEXT_MENU_ID + }); + }); + + chrome.contextMenus.onClicked.addListener(addToStammTV); +} function parseYoutubeURL(url) { + const YOUTUBE_URL_REGEX = /^(?:https?:\/\/(?:www\.)?youtu(?:\.be\/|be\.com\/watch\?v=|be\.com\/shorts\/)){1}([^#&?]*)(?:[?&]t=\d+)?.*/; + let match = url.match(YOUTUBE_URL_REGEX); return (match && match[1].length === 11) ? match[1] : false; } + + function addToStammTV(info, tab) { if (info.menuItemId === CONTEXT_MENU_ID) { //if OUR menu item was clicked let videoId = parseYoutubeURL(info.linkUrl) if (videoId) { - const playerReady = {"type":"playerReady"}; + const playerReady = {"type": "playerReady"}; const setVideo = { type: "setVideo", @@ -55,4 +88,4 @@ function addToStammTV(info, tab) { console.error('o(一︿一+)o not a valid videoId'); } } -} \ No newline at end of file +} diff --git a/out/artifacts/firefox/base.iml b/out/artifacts/firefox/base.iml deleted file mode 100644 index 183c2ef..0000000 --- a/out/artifacts/firefox/base.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/out/artifacts/firefox/firefox.iml b/out/artifacts/firefox/firefox.iml deleted file mode 100644 index 183c2ef..0000000 --- a/out/artifacts/firefox/firefox.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/out/artifacts/firefox/manifest.json b/out/artifacts/firefox/manifest.json deleted file mode 100644 index bcaa621..0000000 --- a/out/artifacts/firefox/manifest.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "StammTV Firefox Extension", - "description": "Adds a context-menu option to send URLs to StammTV", - "version": "1.0", - "manifest_version": 2, - "background": { - "scripts": ["script.js"] - }, - "options_page": "options/options.html", - "permissions": [ - "storage", - "contextMenus" - ], - "action": { - "default_popup": "popup/popup.html" - } -} \ No newline at end of file diff --git a/out/artifacts/firefox/options/options.html b/out/artifacts/firefox/options/options.html deleted file mode 100644 index bf4fdab..0000000 --- a/out/artifacts/firefox/options/options.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - Options for StammTV Chrome Extension - - -
- - -
- -
- - - - - \ No newline at end of file diff --git a/out/artifacts/firefox/options/options.js b/out/artifacts/firefox/options/options.js deleted file mode 100644 index 7ef8389..0000000 --- a/out/artifacts/firefox/options/options.js +++ /dev/null @@ -1,32 +0,0 @@ -// Saves options to chrome.storage -function save_options() { - var stammTVBaseUrl = document.getElementById('stammtv-base-url').value;; - var stammTVWSSUrl = document.getElementById('stammtv-wss-url').value;; - chrome.storage.local.set({ - baseURL: stammTVBaseUrl, - wssURL: stammTVWSSUrl - }, function () { - // Update status to let user know options were saved. - var status = document.getElementById('status'); - status.textContent = 'Saved.'; - status.style.color = '00FF00'; - setTimeout(function () { - status.textContent = ''; - }, 1500); - }); -} - -// Restores select box and checkbox state using the preferences -// stored in chrome.storage. -function restore_options() { - chrome.storage.local.get({ - baseURL: 'Please fill in.', - wssURL: 'Please fill in.' - }, function (items) { - document.getElementById('stammtv-base-url').value = items.baseURL; - document.getElementById('stammtv-wss-url').value = items.wssURL; - }); -} - -document.addEventListener('DOMContentLoaded', restore_options); -document.getElementById('save').addEventListener('click', save_options); \ No newline at end of file diff --git a/out/artifacts/firefox/popup/popup.html b/out/artifacts/firefox/popup/popup.html deleted file mode 100644 index 281016f..0000000 --- a/out/artifacts/firefox/popup/popup.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Popup - - -→ Take me to StammTV! - - - \ No newline at end of file diff --git a/out/artifacts/firefox/popup/popup.js b/out/artifacts/firefox/popup/popup.js deleted file mode 100644 index 857c049..0000000 --- a/out/artifacts/firefox/popup/popup.js +++ /dev/null @@ -1,7 +0,0 @@ -function restore_options() { - chrome.storage.local.get('baseURL', function (result) { - document.getElementById('open-stammtv').href = result.baseURL; - }); -} - -document.addEventListener('DOMContentLoaded', restore_options); diff --git a/out/artifacts/firefox/script.js b/out/artifacts/firefox/script.js deleted file mode 100644 index 343fe03..0000000 --- a/out/artifacts/firefox/script.js +++ /dev/null @@ -1,58 +0,0 @@ -const CONTEXT_MENU_ID = "STAMMTV_ADD_URL_TO_PLAYLIST"; -const YOUTUBE_URL_REGEX = /^(?:https?:\/\/(?:www\.)?youtu(?:\.be\/|be\.com\/watch\?v=|be\.com\/shorts\/)){1}([^#&?]*)(?:[?&]t=\d+)?.*/; -let WEBSOCKET_URL = ""; - -let websocket; - -chrome.storage.local.get('wssURL', function (result) { - WEBSOCKET_URL = result.wssURL; -}); - -chrome.contextMenus.create({ - title: "Zu StammTV Playlist hinzufügen...", - contexts: ["link"], - id: CONTEXT_MENU_ID -}); - -chrome.contextMenus.onClicked.addListener(addToStammTV); - -function parseYoutubeURL(url) { - let match = url.match(YOUTUBE_URL_REGEX); - return (match && match[1].length === 11) ? match[1] : false; -} - -function addToStammTV(info, tab) { - if (info.menuItemId === CONTEXT_MENU_ID) { //if OUR menu item was clicked - let videoId = parseYoutubeURL(info.linkUrl) - if (videoId) { - const playerReady = {"type":"playerReady"}; - - const setVideo = { - type: "setVideo", - video: videoId, - }; - - console.log(websocket); - if (websocket === undefined - || websocket.readyState !== WebSocket.OPEN) { - websocket = new WebSocket(WEBSOCKET_URL); - console.log('websocket created'); - } - - websocket.onopen = function () { - console.log('websocket ready'); - websocket.send(JSON.stringify(playerReady)); - websocket.send(JSON.stringify(setVideo)); - console.log(setVideo); - }; - - setTimeout(function () { - websocket.close(); - console.log('websocket closed'); - }, 1000); - - } else { - console.error('o(一︿一+)o not a valid videoId'); - } - } -} \ No newline at end of file