diff --git a/.vs/Crunchyroll Downloader/v15/.suo b/.vs/Crunchyroll Downloader/v15/.suo index 6a88fc6..80dc884 100644 Binary files a/.vs/Crunchyroll Downloader/v15/.suo and b/.vs/Crunchyroll Downloader/v15/.suo differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide index bea0d5e..1d3dfc7 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm index 756f766..40acb23 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal index c46e19f..08f27e4 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal differ diff --git a/CRD-addon - Chrome/icons/icon-128.png b/CRD-addon - Chrome/icons/icon-128.png new file mode 100644 index 0000000..7e9eb88 Binary files /dev/null and b/CRD-addon - Chrome/icons/icon-128.png differ diff --git a/CRD-addon - Chrome/icons/icon-20.png b/CRD-addon - Chrome/icons/icon-20.png new file mode 100644 index 0000000..012e057 Binary files /dev/null and b/CRD-addon - Chrome/icons/icon-20.png differ diff --git a/CRD-addon - Chrome/icons/icon-48.png b/CRD-addon - Chrome/icons/icon-48.png new file mode 100644 index 0000000..323edbf Binary files /dev/null and b/CRD-addon - Chrome/icons/icon-48.png differ diff --git a/CRD-addon - Chrome/images/submit.png b/CRD-addon - Chrome/images/submit.png new file mode 100644 index 0000000..0c6adb8 Binary files /dev/null and b/CRD-addon - Chrome/images/submit.png differ diff --git a/CRD-addon - Chrome/inject.js b/CRD-addon - Chrome/inject.js new file mode 100644 index 0000000..3b16d99 --- /dev/null +++ b/CRD-addon - Chrome/inject.js @@ -0,0 +1,34 @@ +var episodeCount = document.getElementsByClassName("episode").length; +var i; +for (i = 0; i < episodeCount; i++) { + document.getElementsByClassName("episode")[i].setAttribute('href', "javascript:" + document.getElementsByClassName("episode")[i].href); + document.getElementsByClassName("episode")[i].setAttribute('onclick', 'deselect(this.id)') + //document.getElementsByClassName("episode")[i].style.background = "#f78c25"; + document.getElementsByClassName("episode")[i].setAttribute('id', makeid(8)) + //document.getElementsByClassName("episode")[i].classList.add('CRD-Selected') +} + +function deselect(clicked_id) { + var seleceted = document.getElementById(clicked_id).classList.contains('CRD-Selected') + + if (seleceted == true) { + document.getElementById(clicked_id).classList.remove('CRD-Selected') + document.getElementById(clicked_id).style.background = "#ffffff"; + + } else { + document.getElementById(clicked_id).classList.add('CRD-Selected') + document.getElementById(clicked_id).style.background = "#f78c25"; + + } + +} + +function makeid(length) { + var result = ''; + var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + var charactersLength = characters.length; + for (var i = 0; i < length; i++) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + } + return result; +} diff --git a/CRD-addon - Chrome/inject_funimation.js b/CRD-addon - Chrome/inject_funimation.js new file mode 100644 index 0000000..3b16d99 --- /dev/null +++ b/CRD-addon - Chrome/inject_funimation.js @@ -0,0 +1,34 @@ +var episodeCount = document.getElementsByClassName("episode").length; +var i; +for (i = 0; i < episodeCount; i++) { + document.getElementsByClassName("episode")[i].setAttribute('href', "javascript:" + document.getElementsByClassName("episode")[i].href); + document.getElementsByClassName("episode")[i].setAttribute('onclick', 'deselect(this.id)') + //document.getElementsByClassName("episode")[i].style.background = "#f78c25"; + document.getElementsByClassName("episode")[i].setAttribute('id', makeid(8)) + //document.getElementsByClassName("episode")[i].classList.add('CRD-Selected') +} + +function deselect(clicked_id) { + var seleceted = document.getElementById(clicked_id).classList.contains('CRD-Selected') + + if (seleceted == true) { + document.getElementById(clicked_id).classList.remove('CRD-Selected') + document.getElementById(clicked_id).style.background = "#ffffff"; + + } else { + document.getElementById(clicked_id).classList.add('CRD-Selected') + document.getElementById(clicked_id).style.background = "#f78c25"; + + } + +} + +function makeid(length) { + var result = ''; + var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + var charactersLength = characters.length; + for (var i = 0; i < length; i++) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + } + return result; +} diff --git a/CRD-addon - Chrome/manifest.json b/CRD-addon - Chrome/manifest.json new file mode 100644 index 0000000..d454a69 --- /dev/null +++ b/CRD-addon - Chrome/manifest.json @@ -0,0 +1,26 @@ +{ + "manifest_version": 2, + "name": "Crunchyroll Downloader Addon", + "version": "0.2.0", + + "description": "A Chrome Addon for my Crunchyroll Downloader", + + "icons": { + "48": "icons/icon-48.png" + }, + "permissions": [ + "activeTab", + "tabs" + ], + + "browser_action": { + "default_icon": { + "128": "icons/icon-128.png", + "48": "icons/icon-48.png", + "20": "icons/icon-20.png" + }, + "default_title": "CR-Downloader", + "default_popup": "popup.html" + } + +} \ No newline at end of file diff --git a/CRD-addon - Chrome/popup.css b/CRD-addon - Chrome/popup.css new file mode 100644 index 0000000..1839d7f --- /dev/null +++ b/CRD-addon - Chrome/popup.css @@ -0,0 +1,15 @@ +.btn_class { + background-color: #ff8000; + border: none; + color: white; + padding: 10px; + text-align: center; + text-decoration: none; + font-size: 16px; + margin-left:12px; + margin-right:12px; + margin-Top:12px; + margin-Bottom:12px; + border-radius: 12px; + cursor:pointer; +} \ No newline at end of file diff --git a/CRD-addon - Chrome/popup.html b/CRD-addon - Chrome/popup.html new file mode 100644 index 0000000..1c6e88a --- /dev/null +++ b/CRD-addon - Chrome/popup.html @@ -0,0 +1,34 @@ + + + + + + CR Unblocker plugin popup + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + diff --git a/CRD-addon - Chrome/popup.js b/CRD-addon - Chrome/popup.js new file mode 100644 index 0000000..ed2aa19 --- /dev/null +++ b/CRD-addon - Chrome/popup.js @@ -0,0 +1,335 @@ +chrome.tabs.query({ + active: true, + currentWindow: true +}, + function (tabs) { + console.log(tabs.length); + let tab = tabs[0]; // Safe to assume there will only be one resultconsole.log(tab.url); + console.log(tab.url); + if (tab.url.includes('crunchyroll.com')) { + //var crunchyroll = chrome.tabs.executeScript({ + // code: 'document.getElementsByClassName("episode")[0].href;' + //}); + + //crunchyroll.then(onExecuted, onError); + + chrome.tabs.executeScript(null, { + //code: 'document.getElementsByClassName("episode")[0].href;' + code: 'document.getElementsByClassName("episode").length;' + }, + function (results) { + + if (results > 0 ) + { + onExecuted(results); + } else { + onError("error") + } + + }); + + } else if (tab.url.includes('funimation.com')) { + chrome.tabs.executeScript(null, { + code: 'document.getElementsByClassName("trackVideo")[0].href' + }, + function (results) { + + if (results !== null) { + FunimationSuccess(results); + + } else { + FunimationError(results); + + } + + }); + + } else { + + document.getElementById("btn_add").hidden = true; + document.getElementById("btn_enable_select").hidden = true; + document.getElementById("btn_add_mass").hidden = true; + document.getElementById("btn_select_all").hidden = true; + document.getElementById("btn_select_none").hidden = true; + document.getElementById("btn_enable_funimation_select").hidden = true; + document.getElementById("btn_add_funimation").hidden = true; + } +}); + +document.getElementById('btn_enable_select').addEventListener('click', () => { + + chrome.tabs.executeScript(null, { + code: 'var script=document.createElement("script");script.type="text/javascript",script.src="http://127.0.0.1/inject.js",document.head.appendChild(script);' + }); + + //browser.tabs.executeScript({ + // code: 'var script=document.createElement("script");script.type="text/javascript",script.src="http://127.0.0.1/inject.js",document.head.appendChild(script);' + //}); //load script from local CRD Server included in https://github.com/hama3254/Crunchyroll-Downloader-v3.0 + + document.getElementById("btn_add_mass").hidden = false; + document.getElementById("btn_select_all").hidden = false; + document.getElementById("btn_select_none").hidden = false; + document.getElementById("btn_enable_select").hidden = true; + document.getElementById("btn_add").hidden = true; + document.getElementById("btn_enable_funimation_select").hidden = true; + document.getElementById("btn_add_funimation").hidden = true; +}); + +document.getElementById('btn_select_all').addEventListener('click', () => { + chrome.tabs.query({ + active: true, + currentWindow: true + }, + function (tabs) { + console.log(tabs.length); + let tab = tabs[0]; // Safe to assume there will only be one resultconsole.log(tab.url); + console.log(tab.url); + if (tab.url.includes('crunchyroll.com')) { + + chrome.tabs.executeScript(null, { + code: 'var i,episodeCount=document.getElementsByClassName("episode").length;for(i=0;i { + + chrome.tabs.query({ + active: true, + currentWindow: true + }, + function (tabs) { + console.log(tabs.length); + let tab = tabs[0]; // Safe to assume there will only be one resultconsole.log(tab.url); + console.log(tab.url); + if (tab.url.includes('crunchyroll.com')) { + + chrome.tabs.executeScript(null, { + code: 'var i,episodeCount=document.getElementsByClassName("episode").length;for(i=0;i { + chrome.tabs.executeScript(null, { + code: "document.getElementsByClassName('no-js')[0].innerHTML;" + }, + function (results) { + + if (results !== null) { + + document.getElementById("btn_add").disabled = true; + document.getElementById("btn_add").style.background = "#c9c9c9" + const form = document.createElement('form'); + form.method = 'post'; + form.action = "http://127.0.0.1/post"; + const hiddenField = document.createElement('input'); + hiddenField.type = 'hidden'; + hiddenField.name = "HTMLSingle"; + hiddenField.value = results; + form.appendChild(hiddenField); + + document.body.appendChild(form); + form.submit(); + + setTimeout(function () { + document.getElementById("btn_add").style.background = "#ff8000" + }, 4000); + setTimeout(function () { + document.getElementById("btn_add").disabled = false; + }, 4000); + + } else { + add_one_error(results); + + } + + }); + +}); + +document.getElementById('btn_add_funimation').addEventListener('click', () => { + + chrome.tabs.query({ + active: true, + currentWindow: true + }, + function (tabs) { + console.log(tabs.length); + let tab = tabs[0]; // Safe to assume there will only be one resultconsole.log(tab.url); + console.log(tab.url); + const form = document.createElement('form'); + form.method = 'post'; + form.action = "http://127.0.0.1/post"; + + const hiddenField2 = document.createElement('input'); + hiddenField2.type = 'hidden'; + hiddenField2.name = "FunimationURL"; + hiddenField2.value = tab.url; + form.appendChild(hiddenField2); + + document.body.appendChild(form); + form.submit(); + }); +}); + +document.getElementById('btn_add_mass').addEventListener('click', () => { + + chrome.tabs.executeScript(null, { + code: 'var i,URLList="";for(i=0;i { + + // browser.tabs.executeScript({ + // code: 'var script=document.createElement("script");script.type="text/javascript",script.src="http://127.0.0.1/inject_funimation.js",document.head.appendChild(script);' + // }); //load script from local CRD Server included in https://github.com/hama3254/Crunchyroll-Downloader-v3.0 + chrome.tabs.executeScript(null, { + code: 'var script=document.createElement("script");script.type="text/javascript",script.src="http://127.0.0.1/inject_funimation.js",document.head.appendChild(script);' + }); + + document.getElementById("btn_add_mass").hidden = false; + document.getElementById("btn_select_all").hidden = false; + document.getElementById("btn_select_none").hidden = false; + document.getElementById("btn_enable_select").hidden = true; + document.getElementById("btn_add").hidden = true; + document.getElementById("btn_add_funimation").hidden = true; + +}); + +function FunimationSuccess(result) { + console.log(result[0]); + + if (result[0].includes('javascript:')) { + document.getElementById("btn_add").hidden = true; + document.getElementById("btn_add_mass").hidden = false; + document.getElementById("btn_select_all").hidden = false; + document.getElementById("btn_select_none").hidden = false; + document.getElementById("btn_enable_select").hidden = true; + + document.getElementById("btn_enable_funimation_select").hidden = true; + document.getElementById("btn_add_funimation").hidden = true; + console.log(true); + } else { + document.getElementById("btn_add").hidden = true; + document.getElementById("btn_add_funimation").hidden = true; + document.getElementById("btn_enable_select").hidden = true; + document.getElementById("btn_add_mass").hidden = true; + document.getElementById("btn_select_all").hidden = true; + document.getElementById("btn_select_none").hidden = true; + document.getElementById("btn_enable_funimation_select").hidden = false; + + console.log(false); + } +} + +function FunimationError(error) { + console.log(`Error: ${error}`); + + document.getElementById("btn_add").hidden = true; + document.getElementById("btn_add_mass").hidden = true; + document.getElementById("btn_select_all").hidden = true; + document.getElementById("btn_select_none").hidden = true; + document.getElementById("btn_enable_select").hidden = true; + document.getElementById("btn_add_funimation").hidden = false; + document.getElementById("btn_enable_funimation_select").hidden = true; + +} diff --git a/Crunchyroll Downloader/CRD_List_Item.vb b/Crunchyroll Downloader/CRD_List_Item.vb index a95c27b..8632303 100644 --- a/Crunchyroll Downloader/CRD_List_Item.vb +++ b/Crunchyroll Downloader/CRD_List_Item.vb @@ -249,6 +249,7 @@ Public Class CRD_List_Item #Region "Download + Update UI" Public Sub StartDownload(ByVal DL_URL As String, ByVal DL_Pfad As String, ByVal Filename As String, ByVal DownloadHybridMode As Boolean) + 'MsgBox(DL_URL) If DownloadHybridMode = True Then Dim Evaluator = New Thread(Sub() DownloadHybrid(DL_URL, DL_Pfad, Filename)) Evaluator.Start() diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index 9c13243..3d0b585 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -1497,6 +1497,7 @@ Public Class Main 'MsgBox(URL_DL) End If #End Region + #Region "thumbnail" Dim thumbnail As String() = WebbrowserText.Split(New String() {My.Resources.thumbnailString}, System.StringSplitOptions.RemoveEmptyEntries) Dim thumbnail2 As String() = thumbnail(1).Split(New String() {Chr(34) + "}"}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) @@ -2460,7 +2461,7 @@ Public Class Main 'End Try Try - Dim GeckoHTML As String = My.Resources.htmlTop + Dim GeckoHTML As String = My.Resources.htmlTop + vbNewLine + My.Resources.htmlTitlel.Replace("Placeholder", StatusMainForm.Text) Dim LiAdd As String = Nothing For ii As Integer = 0 To ItemList.Count - 1 For i As Integer = 0 To liList.Count - 1 @@ -2574,7 +2575,10 @@ Public Class Main If strArray(0).Trim().ToUpper.Equals("POST") Then Debug.WriteLine("receiving data from the add-on") - + Me.Invoke(New Action(Function() + StatusMainForm.Text = "Status: receiving data from the add-on" + Return Nothing + End Function)) #Region "CR Einzeln" If InStr(htmlReq, "HTMLSingle=") Then @@ -2828,6 +2832,8 @@ Public Class Main Return "application/vnd.ms-powerpoint" ElseIf (httpRequest.EndsWith("js")) Then Return "application/javascript" + ElseIf (httpRequest.EndsWith("ass")) Then + Return "application/octet-stream" Else Return "text/plain" End If diff --git a/Crunchyroll Downloader/My Project/Resources.Designer.vb b/Crunchyroll Downloader/My Project/Resources.Designer.vb index ca21bfb..877f3d0 100644 --- a/Crunchyroll Downloader/My Project/Resources.Designer.vb +++ b/Crunchyroll Downloader/My Project/Resources.Designer.vb @@ -437,6 +437,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Zeichenfolge, die <a class="main_titel">Placeholder</a> + '''<img alt="image error" src="balken.png" class="class-balken"> ähnelt. + ''' + Friend ReadOnly Property htmlTitlel() As String + Get + Return ResourceManager.GetString("htmlTitlel", resourceCulture) + End Get + End Property + ''' ''' Sucht eine lokalisierte Zeichenfolge, die <!DOCTYPE html> '''<head> diff --git a/Crunchyroll Downloader/My Project/Resources.resx b/Crunchyroll Downloader/My Project/Resources.resx index b60c45d..e05f111 100644 --- a/Crunchyroll Downloader/My Project/Resources.resx +++ b/Crunchyroll Downloader/My Project/Resources.resx @@ -457,11 +457,11 @@ I delete the curremt session with the unlock, if you want to be logged in with t .percenttext{float:right;text-align:right;font-size:16px;display:inline-block;margin-right:25px} .resotext{text-align: left;font-size:18px;margin-left:0px;font-weight:550;} .titel{font-size:18px;font-weight:550;display:block;margin-top:5px} + .main_titel{font-size:18px;font-weight:550;display:block;text-align:center;margin-top:5px} .cc-wert{font-size:18px;font-weight:550;display:block;margin-top:-20px;margin-left:250px;text-decoration: none;color:black;} .liClass{margin-bottom:8px} </style> -<body id="bodypage" class="main-bg" > -<img alt="image error" src="balken1.png" class="class-balken"> +<body id="bodypage" class="main-bg" > ..\Resources\main_credits_default.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -469,4 +469,8 @@ I delete the curremt session with the unlock, if you want to be logged in with t ..\Resources\balken_console.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + <a class="main_titel">Placeholder</a> +<img alt="image error" src="balken.png" class="class-balken"> + \ No newline at end of file diff --git a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe index a81a0f3..53ec1f6 100644 Binary files a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe and b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe differ diff --git a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb index 0a39086..4a1cee9 100644 Binary files a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb and b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb differ diff --git a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.xml b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.xml index 7abeb68..8a81c2c 100644 --- a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.xml +++ b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.xml @@ -236,6 +236,12 @@ setInterval(function loadXMLDoc() { <span class="titel" dir="auto"> ähnelt. + + + Sucht eine lokalisierte Zeichenfolge, die <a class="main_titel">Placeholder</a> +<img alt="image error" src="balken.png" class="class-balken"> ähnelt. + + Sucht eine lokalisierte Zeichenfolge, die <!DOCTYPE html> diff --git a/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index - Kopie.html b/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index - Kopie.html new file mode 100644 index 0000000..f5e37f5 --- /dev/null +++ b/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index - Kopie.html @@ -0,0 +1,74 @@ + + + + + + CRD + + + +image error +Deutsch +
+ +image error + +
+ +RWBY
Staffel 2 Folge 4 5
+ +
+ +
+ +
+Finished - 133,83MB +
+
+1080p + + image errorDeutsch + +
+ +
+ +
+ +image error + + \ No newline at end of file diff --git a/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index.html b/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index.html index 23c3853..00ce397 100644 --- a/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index.html +++ b/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index.html @@ -22,40 +22,14 @@ .percenttext{float:right;text-align:right;font-size:16px;display:inline-block;margin-right:25px} .resotext{text-align: left;font-size:18px;margin-left:0px;font-weight:550;} .titel{font-size:18px;font-weight:550;display:block;margin-top:5px} + .main_titel{font-size:18px;font-weight:550;display:block;text-align:center;margin-top:5px} .cc-wert{font-size:18px;font-weight:550;display:block;margin-top:-20px;margin-left:250px;text-decoration: none;color:black;} .liClass{margin-bottom:8px} +Crunchyroll Downloader image error -
- -image error - -
- -Overlord
Season 1 Episode 1
- -
- -
- -
-Finished - 1439,81MB -
-
-1080p - - image errornull - -
- -
- -
- -image error