From f307b35710bfe09023086194ef88ae727cd0a4a3 Mon Sep 17 00:00:00 2001 From: Jackson Bell Date: Wed, 31 Jul 2024 16:26:02 -0400 Subject: [PATCH] Added senmanga module --- Module Parser KETSU/SenManga/.DS_Store | Bin 0 -> 6148 bytes .../SenManga/Chapters/.DS_Store | Bin 0 -> 6148 bytes .../SenManga/Chapters/Chapters.html | 87 +++ Module Parser KETSU/SenManga/Info/.DS_Store | Bin 0 -> 6148 bytes Module Parser KETSU/SenManga/Info/Info.html | 114 ++++ .../SenManga/MainPage/mainPage1.html | 269 ++++++++ Module Parser KETSU/SenManga/Search/.DS_Store | Bin 0 -> 6148 bytes .../SenManga/Search/Search.html | 248 +++++++ .../SenManga/moduleTemplate.json | 618 ++++++++++++++++++ 9 files changed, 1336 insertions(+) create mode 100644 Module Parser KETSU/SenManga/.DS_Store create mode 100644 Module Parser KETSU/SenManga/Chapters/.DS_Store create mode 100644 Module Parser KETSU/SenManga/Chapters/Chapters.html create mode 100644 Module Parser KETSU/SenManga/Info/.DS_Store create mode 100644 Module Parser KETSU/SenManga/Info/Info.html create mode 100644 Module Parser KETSU/SenManga/MainPage/mainPage1.html create mode 100644 Module Parser KETSU/SenManga/Search/.DS_Store create mode 100644 Module Parser KETSU/SenManga/Search/Search.html create mode 100644 Module Parser KETSU/SenManga/moduleTemplate.json diff --git a/Module Parser KETSU/SenManga/.DS_Store b/Module Parser KETSU/SenManga/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..bb30730c4ec08bf1bbeec321ad2a36220b3553e4 GIT binary patch literal 6148 zcmeHKO;5r=5S_(}i^PP3CLEi1H4#yx#!CZw@L*!B(SsUnr9xxv5?bUyNP5;kpbU=;Xk3aHIphcZQG;=5?>BcOgXNk7Cci41<27v|1N&>VSiC498J;`RRy2;_6$1_vyq?`| z9ErGvbChSn3B>RKg3hZs;QPsEf+vSl{B}d+dWP77U{3f>@tWYB2N&y+hZX4_+H=Br zjMD_)(QkiN)O&{)XH78ci~>f1f1?1M4>mfXqcKw`j}C0)6#&t~VQCoCU4n9KjgH1l zAB(WT*> YO#z~#F;j>mXy%WAl)*GcfnQbN1D(wTga7~l literal 0 HcmV?d00001 diff --git a/Module Parser KETSU/SenManga/Chapters/.DS_Store b/Module Parser KETSU/SenManga/Chapters/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..e932f2cb172d84d305d7e4de3549086068bbb3a1 GIT binary patch literal 6148 zcmeH~Jx;?w5QX1Bibx14CFPzV5;rg*6x3V*0!S1_i6HduI5xcb0bv;m8VdAAnti+D z8L#~n9xnh}z1*Dw3jlMvD_(t=nqPOH*g-{%O6NWHxW^NovBbk9`}=^`9^;((H`tBp z_jp8q*>7(*{dU7Ff5bET@-2)rnFxr02#A0Ph`{d&c<-gnk5V;?fCz}dCjtLHG`ee7 zI;6&@gF_qvs56GcIFGXgwRwQrl@6(l&@4--S!#8}uq + function Chapters(request, extra, javascriptConfig, output) { + this.request = request; + this.extra = extra; + this.javascriptConfig = javascriptConfig; + this.output = output; + } + + function ModuleRequest(url, method, headers, httpBody) { + this.url = url; + this.method = method; + this.headers = headers; + this.httpBody = httpBody; + } + + function Extra(commands, extraInfo) { + this.commands = commands; + this.extraInfo = extraInfo; + } + + function Commands(commandName, params) { + this.commandName = commandName; + this.params = params; + } + + function JavascriptConfig(removeJavascript, loadInWebView, javaScript) { + this.removeJavascript = removeJavascript; + this.loadInWebView = loadInWebView; + this.javaScript = javaScript; + } + + function KeyValue(key, value) { + this.key = key; + this.value = value; + } + + function Output( videos, images, text) { + this.videos = videos; + this.images = images; + this.text = text; + } + + function Videos(needsResolver, rawVideo) { + this.needsResolver = needsResolver; + this.rawVideo = rawVideo; + } + + function NeedsResolver(resolverIdentifier, link) { + this.resolverIdentifier = resolverIdentifier; + this.link = link; + } + + function RawVideo(video) { + this.video = video; + } + + function Video(videoQuality, videoLink) { + this.videoQuality = videoQuality; + this.videoLink = videoLink; + } + + + + function Text(text) { + this.text = text; + } + + var output = []; + var savedData = document.getElementById('ketsu-final-data'); + var parsedJson = JSON.parse(savedData.innerHTML); + + var emptyKeyValue = [new KeyValue('', '')]; + + let images = []; + var imagesArray = document.querySelector('.reader').querySelectorAll('.picture'); + for(image of imagesArray){ + let imgSrc = image.src; + images.push(new ModuleRequest(imgSrc, 'get', emptyKeyValue, null)); + } + + let emptyExtra = new Extra([new Commands('', emptyKeyValue)], emptyKeyValue); + var chaptersObject = new Chapters(new ModuleRequest('', '', emptyKeyValue, null), emptyExtra, new JavascriptConfig(false, false, ''), new Output(null, images, null)); + var finalJson = JSON.stringify(chaptersObject); + savedData.innerHTML = finalJson; + + diff --git a/Module Parser KETSU/SenManga/Info/.DS_Store b/Module Parser KETSU/SenManga/Info/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..0522256da8873da640c96086acc892d2589b6276 GIT binary patch literal 6148 zcmeHKyG{c^3>-s>AexkvTT&rW)2yOUq~-@uK#1btn$TaxckyR1eh3jAG)OdPEZMW` z_1xyBIL82N{c?W^tN<+Oj(GJjH$Qiu*->STNar&y@Q6L0Fl>ie_4f(qo?we-JYf9F zAMbXAmldh6`vyw^7RE!}J0=x$sG og(2E8G1@UV-j2_rDC?T9dEN`B#Go@DbfW$YxGpj&@Yf1_0M}F-F#rGn literal 0 HcmV?d00001 diff --git a/Module Parser KETSU/SenManga/Info/Info.html b/Module Parser KETSU/SenManga/Info/Info.html new file mode 100644 index 0000000..b6abcb7 --- /dev/null +++ b/Module Parser KETSU/SenManga/Info/Info.html @@ -0,0 +1,114 @@ + + diff --git a/Module Parser KETSU/SenManga/MainPage/mainPage1.html b/Module Parser KETSU/SenManga/MainPage/mainPage1.html new file mode 100644 index 0000000..337c5f5 --- /dev/null +++ b/Module Parser KETSU/SenManga/MainPage/mainPage1.html @@ -0,0 +1,269 @@ + + + + \ No newline at end of file diff --git a/Module Parser KETSU/SenManga/Search/.DS_Store b/Module Parser KETSU/SenManga/Search/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..499fe27628018e5f7f73221334db6f95ad39b225 GIT binary patch literal 6148 zcmeHKJxjz;5S-O34z9V<@|9MCwaw!=3+wv>dZ%C!IS}nr`MdmQI{SeTqK#l9v#>kw zZFcgKDY97rwt2n31l9nSbVs~-n44dBpV>)ej7aA_4tT@`{RL06>hBZIU15g@+~Ik` zA8v-@VLu%AtnkOXqMv_+aV3)iQa}nw0VyB_ey4!EzP z-=ZAW6BVU^6qqV-n%lMa|7-dW^Z%5jofMD)|4IQ{Y + +const DefaultLayouts = { + ultraWideFull : 'ultraWideFull', + ultraWide : 'ultraWide', + + wideFull : 'wideFull', + wide : 'wide', + + wideStrechedFull : 'wideStrechedFull', + wideStrechedFullDouble : 'WideStrechedFullDouble', + wideStreched : 'wideStreched', + wideStrechedDouble : 'wideStrechedDouble', + + wideStrechedFullList : 'wideStrechedFullList', + wideStrechedList : 'wideStrechedList', + + doublets : 'doublets', + doubletsDouble : 'doubletsDouble', + doubletsFull : 'doubletsFull', + doubletsFullDouble : 'doubletsFullDouble', + + doubletsConstant : 'doubletsConstant', + doubletsDoubleConstant : 'doubletsDoubleConstant', + doubletsFullConstant : 'doubletsFullConstant', + doubletsFullDoubleConstant : 'doubletsFullDoubleConstant', + + longDoublets : 'longDoublets', + longDoubletsDouble : 'longDoubletsDouble', + longDoubletsFull : 'longDoubletsFull', + longDoubletsFullDouble : 'longDoubletsFullDouble', + + longDoubletsConstant : 'longDoubletsConstant', + longDoubletsDoubleConstant : 'longDoubletsDoubleConstant', + longDoubletsFullConstant : 'longDoubletsFullConstant', + longDoubletsFullDoubleConstant : 'longDoubletsFullDoubleConstant', + + triplets : 'triplets', + tripletsDouble : 'tripletsDouble', + tripletsFull : 'tripletsFull', + tripletsFullDouble : 'tripletsFullDouble', + + tripletsConstant : 'tripletsConstant', + tripletsDoubleConstant : 'tripletsDoubleConstant', + tripletsFullConstant : 'tripletsFullConstant', + tripletsFullDoubleConstant : 'tripletsFullDoubleConstant', + + longTriplets : 'longTriplets', + longTripletsDouble : 'longTripletsDouble', + longTripletsFull : 'longTripletsFull', + longTripletsFullDouble : 'longTripletsFullDouble', + + longTripletsConstant : 'longTripletsConstant', + longTripletsDoubleConstant : 'longTripletsDoubleConstant', + longTripletsFullConstant : 'longTripletsFullConstant', + longTripletsFullDoubleConstant : 'longTripletsFullDoubleConstant', + + none: '' + }; + + const CellDesings = { + Special1 : 'Special1', + Special2 : 'Special2', + Special3 : 'Special3', + CELLHelperText : 'CELLHelperText', + small1 : 'small1', + small2 : 'small2', + normal1 : 'normal1', + normal2 : 'normal2', + normal3 : 'normal3', + normal4 : 'normal4', + normal5 : 'normal5', + normal6 : 'normal6', + normal7 : 'normal7', + + wide1 : 'wide1', + wide2 : 'wide2', + wide3 : 'wide3', + wide4 : 'wide4', + wide5 : 'wide5', + wide6 : 'wide6', + wide7 : 'wide7', + wide8 : 'wide8', + wide9 : 'wide9', + wide10 : 'wide10', + wide11 : 'wide11' + }; + + const Paging = { + leading : 'leading', + centered : 'centered', + none : '' + }; + + const Orientation = { + horizontal : 'horizontal', + vertical : 'vertical' + }; + function Search(request,extra,separator,javascriptConfig,output) { + this.request = request; + this.extra = extra; + this.separator = separator; + this.javascriptConfig = javascriptConfig; + this.output = output; + } + + function ModuleRequest(url,method,headers,httpBody) { + this.url = url; + this.method = method; + this.headers = headers; + this.httpBody = httpBody; + } + + function Extra(commands,extraInfo) { + this.commands = commands; + this.extraInfo = extraInfo; + } + + function Commands(commandName,params) { + this.commandName = commandName; + this.params = params; + } + + function JavascriptConfig(removeJavascript,loadInWebView,javaScript) { + this.removeJavascript = removeJavascript; + this.loadInWebView = loadInWebView; + this.javaScript = javaScript; + } + + function KeyValue(key,value) { + this.key = key; + this.value = value; + } + + function Output(cellDesing,orientation,defaultLayout,paging,section,layout,data) { + this.cellDesing = cellDesing; + this.orientation = orientation; + this.defaultLayout = defaultLayout; + this.paging = paging; + this.section = section; + this.layout = layout; + this.data = data; + } + + function Section(sectionName,separator) { + this.sectionName = sectionName; + this.separator = separator; + } + + function Layout(insets, visibleCellsWidthS,visibleCellsWidthM,visibleCellsWidthL, visibleCellsHeight, heightForVisibleCells, cellSize, ratio, constant, horizontalSpacing, verticalSpacing) { + this.insets = insets; + this.visibleCellsWidthS = visibleCellsWidthS; + this.visibleCellsWidthM = visibleCellsWidthM; + this.visibleCellsWidthL = visibleCellsWidthL; + this.visibleCellsHeight = visibleCellsHeight; + this.heightForVisibleCells = heightForVisibleCells; + this.cellSize = cellSize; + this.ratio = ratio; + this.constant = constant; + this.horizontalSpacing = horizontalSpacing; + this.verticalSpacing = verticalSpacing; + } + + + function Insets(top,bottom,left,right) { + this.top = top; + this.bottom = bottom; + this.left = left; + this.right = right; + } + + function Size(width,height) { + this.width = width; + this.height = height; + } + + function Ratio(inRelation,number1,number2) { + this.inRelation = inRelation; + this.number1 = number1; + this.number2 = number2; + + } + + function Data(image,title,description,field1,field2,field3,field4,isChapter,link,openInWebView) { + this.image = image; + this.title = title; + this.description = description; + this.field1 = field1; + this.field2 = field2; + this.field3 = field3; + this.field4 = field4; + this.isChapter = isChapter; + this.link = link; + this.openInWebView = openInWebView; + } + + function quickData(link,image,title,field1)  { + return new Data(image,title,'unknown',field1,'unknown','unknown','unknown',false,link); + } + + function shuffle(a) { + var j, x, i; + for (i = a.length - 1; i > 0; i--) { + j = Math.floor(Math.random() * (i + 1)); + x = a[i]; + a[i] = a[j]; + a[j] = x; + } + return a; + } + + + + var savedData = document.getElementById('ketsu-final-data'); + + var parsedJson = JSON.parse(savedData.innerHTML); + + let output = []; + let emptyKeyValue = [new KeyValue('','')]; + + let found = document.querySelector('.search-body').querySelectorAll('.mng'); + let dataArray = []; + for(manga of found){ + var image = manga.querySelector('.cover img').src; + image = new ModuleRequest(image, 'get', emptyKeyValue, null); + + let title = manga.querySelector('.item-info .series-title a').text.trim(); + + let type = manga.querySelector('.cover .type').innerText; + + var link = manga.querySelector('a').href; + link = new ModuleRequest(link, 'get', emptyKeyValue, null); + + let data = new Data(image, title, '', type, '', '', '', false, link); + dataArray.push(data); + } + + output.push(new Output(CellDesings.wide6, Orientation.vertical, DefaultLayouts.doubletsFull, Paging.none, new Section('', true), null, dataArray)); + + let searchPageObject = new Search(new ModuleRequest('','',emptyKeyValue,null),new Extra([new Commands('',emptyKeyValue)],emptyKeyValue),'',new JavascriptConfig(true,false,''),output); + + var finalJson = JSON.stringify(searchPageObject); + savedData.innerHTML = finalJson; + + + + \ No newline at end of file diff --git a/Module Parser KETSU/SenManga/moduleTemplate.json b/Module Parser KETSU/SenManga/moduleTemplate.json new file mode 100644 index 0000000..1bc1e07 --- /dev/null +++ b/Module Parser KETSU/SenManga/moduleTemplate.json @@ -0,0 +1,618 @@ +{ + "moduleInfo": { + "moduleName": "SenManga", + "moduleInitials": "SM", + "moduleDesc": "Module for senmanga, a website for reading japanese raws, for those who can read or want to learn Japanese. The site is somewhat unreliable at times, but the module works for everything that the site actually has.", + "developer": "ベル", + "moduleID": "189412478518682", + "moduleImage": "https://raw.senmanga.com/favicon.ico", + "moduleVersion": 1.0, + "moduleLenguage": "JP", + "moduleType": "Image", + "baseURL": "https://raw.senmanga.com/", + "moduleDeveloperSite": "https://offsetparts.github.io/KetsuModules/", + "UpdateSite": "https://raw.githubusercontent.com/OffsetParts/KetsuModules/master/Modules/SenManga/moduleTemplate.json", + "preferedServer": "", + "preferedDownloadServer": "", + "blackListed": [ + "" + ] + }, + "global": { + "variables": [ + { + "key": "", + "value": "" + } + ], + "cookies": [ + { + "key": "", + "value": "" + } + ], + "headers": [ + { + "key": "", + "value": "" + } + ] + }, + "mainPage": [ + { + "request": { + "url": "https://raw.senmanga.com/", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "const DefaultLayouts = { ultraWideFull : 'ultraWideFull', ultraWide : 'ultraWide', wideFull : 'wideFull', wide : 'wide', wideStrechedFull : 'wideStrechedFull', wideStrechedFullDouble : 'WideStrechedFullDouble', wideStreched : 'wideStreched', wideStrechedDouble : 'wideStrechedDouble', wideStrechedFullList : 'wideStrechedFullList', wideStrechedList : 'wideStrechedList', doublets : 'doublets', doubletsDouble : 'doubletsDouble', doubletsFull : 'doubletsFull', doubletsFullDouble : 'doubletsFullDouble', doubletsConstant : 'doubletsConstant', doubletsDoubleConstant : 'doubletsDoubleConstant', doubletsFullConstant : 'doubletsFullConstant', doubletsFullDoubleConstant : 'doubletsFullDoubleConstant', longDoublets : 'longDoublets', longDoubletsDouble : 'longDoubletsDouble', longDoubletsFull : 'longDoubletsFull', longDoubletsFullDouble : 'longDoubletsFullDouble', longDoubletsConstant : 'longDoubletsConstant', longDoubletsDoubleConstant : 'longDoubletsDoubleConstant', longDoubletsFullConstant : 'longDoubletsFullConstant', longDoubletsFullDoubleConstant : 'longDoubletsFullDoubleConstant', triplets : 'triplets', tripletsDouble : 'tripletsDouble', tripletsFull : 'tripletsFull', tripletsFullDouble : 'tripletsFullDouble', tripletsConstant : 'tripletsConstant', tripletsDoubleConstant : 'tripletsDoubleConstant', tripletsFullConstant : 'tripletsFullConstant', tripletsFullDoubleConstant : 'tripletsFullDoubleConstant', longTriplets : 'longTriplets', longTripletsDouble : 'longTripletsDouble', longTripletsFull : 'longTripletsFull', longTripletsFullDouble : 'longTripletsFullDouble', longTripletsConstant : 'longTripletsConstant', longTripletsDoubleConstant : 'longTripletsDoubleConstant', longTripletsFullConstant : 'longTripletsFullConstant', longTripletsFullDoubleConstant : 'longTripletsFullDoubleConstant', none: '' }; const CellDesings = { Special1 : 'Special1', Special2 : 'Special2', Special3 : 'Special3', CELLHelperText : 'CELLHelperText', small1 : 'small1', small2 : 'small2', normal1 : 'normal1', normal2 : 'normal2', normal3 : 'normal3', normal4 : 'normal4', normal5 : 'normal5', normal6 : 'normal6', normal7 : 'normal7', wide1 : 'wide1', wide2 : 'wide2', wide3 : 'wide3', wide4 : 'wide4', wide5 : 'wide5', wide6 : 'wide6', wide7 : 'wide7', wide8 : 'wide8', wide9 : 'wide9', wide10 : 'wide10', wide11 : 'wide11' }; const Paging = { leading : 'leading', centered : 'centered', none : '' }; const Orientation = { horizontal : 'horizontal', vertical : 'vertical' }; function MainPage(request, extra, javascriptConfig, output) { this.request = request; this.extra = extra; this.javascriptConfig = javascriptConfig; this.output = output; } function ModuleRequest(url, method, headers, httpBody) { this.url = url; this.method = method; this.headers = headers; this.httpBody = httpBody; } function Extra(commands, extraInfo) { this.commands = commands; this.extraInfo = extraInfo; } function Commands(commandName, params) { this.commandName = commandName; this.params = params; } function JavascriptConfig(removeJavascript, loadInWebView, javaScript) { this.removeJavascript = removeJavascript; this.loadInWebView = loadInWebView; this.javaScript = javaScript; } function KeyValue(key, value) { this.key = key; this.value = value; } function Output(cellDesing, orientation, defaultLayout, paging, section, layout, data) { this.cellDesing = cellDesing; this.orientation = orientation; this.defaultLayout = defaultLayout; this.paging = paging; this.section = section; this.layout = layout; this.data = data; } function Section(sectionName, separator) { this.sectionName = sectionName; this.separator = separator; } function Layout(insets, visibleCellsWidthS,visibleCellsWidthM,visibleCellsWidthL, visibleCellsHeight, heightForVisibleCells, cellSize, ratio, constant, horizontalSpacing, verticalSpacing) { this.insets = insets; this.visibleCellsWidthS = visibleCellsWidthS; this.visibleCellsWidthM = visibleCellsWidthM; this.visibleCellsWidthL = visibleCellsWidthL; this.visibleCellsHeight = visibleCellsHeight; this.heightForVisibleCells = heightForVisibleCells; this.cellSize = cellSize; this.ratio = ratio; this.constant = constant; this.horizontalSpacing = horizontalSpacing; this.verticalSpacing = verticalSpacing; } function Insets(top, bottom, left, right) { this.top = top; this.bottom = bottom; this.left = left; this.right = right; } function Size(width, height) { this.width = width; this.height = height; } function Ratio(inRelation, number1, number2) { this.inRelation = inRelation; this.number1 = number1; this.number2 = number2; } function Data(image, title, description, field1, field2, field3, field4, isChapter, link,openInWebView) { this.image = image; this.title = title; this.description = description; this.field1 = field1; this.field2 = field2; this.field3 = field3; this.field4 = field4; this.isChapter = isChapter; this.link = link; this.openInWebView = openInWebView; } function quickData(link,image,title,field1)  { return new Data(image,title,'unknown',field1,'unknown','unknown','unknown',false,link); } function shuffle(a) { var j, x, i; for (i = a.length - 1; i > 0; i--) { j = Math.floor(Math.random() * (i + 1)); x = a[i]; a[i] = a[j]; a[j] = x; } return a; } var savedData = document.getElementById('ketsu-final-data'); var parsedJson = JSON.parse(savedData.innerHTML); let output = []; let emptyKeyValue = [new KeyValue('','')]; let updates = document.querySelector('.updates').querySelectorAll('.mng'); let dataArray = []; for(manga of updates){ let title = manga.querySelector('.dtl .text-truncate').title; var image = manga.querySelector('.cover .img-responsive').src; image = new ModuleRequest(image, 'get', emptyKeyValue, null); var link = manga.querySelector('.dtl .text-truncate').href; link = new ModuleRequest(link, 'get', emptyKeyValue, null); var chapter; if(manga.querySelector('.dtl li a') != null){ chapter = manga.querySelector('.dtl li a').innerText; } else { chapter = ''; } let data = new Data(image, title, '', chapter, '', '','',false,link); dataArray.push(data); } let topManga = document.querySelector('.series-list').querySelectorAll('li'); let topArray = []; for(manga of topManga){ let title = manga.querySelector('h2 a').text.trim(); var image = manga.querySelector('.cover .img-responsive').src; image = new ModuleRequest(image, 'get', emptyKeyValue, null); var link = manga.querySelector('h2 a').href; link = new ModuleRequest(link, 'get', emptyKeyValue, null); let data = new Data(image, title, '', '', '', '','',false,link); topArray.push(data); } output.push(new Output(CellDesings.normal1, Orientation.horizontal, DefaultLayouts.longTripletsConstant, Paging.leading, new Section('Popular', true), null, shuffle(topArray.slice()))); output.push(new Output(CellDesings.normal1, Orientation.vertical, DefaultLayouts.longTripletsFullConstant, Paging.centered, new Section('Updates', true), null, dataArray)); let MainPageObject = new MainPage(new ModuleRequest('','get',emptyKeyValue,null),new Extra([new Commands('',emptyKeyValue)],emptyKeyValue),new JavascriptConfig(true,false,''),output); var finalJson = JSON.stringify(MainPageObject); savedData.innerHTML = finalJson; console.log(finalJson);" + }, + "output": [ + { + "cellDesing": "normal1", + "orientation": "vertical", + "defaultLayout": "wide", + "paging": "", + "section": { + "sectionName": "", + "separator": false + }, + "layout": { + "insets": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "visibleCellsWidthS": 2, + "visibleCellsWidthM": 2, + "visibleCellsWidthL": 2, + "visibleCellsHeight": 2, + "heightForVisibleCells": 400, + "cellSize": { + "width": 300, + "height": 300 + }, + "ratio": { + "inRelation": "width", + "number1": 1, + "number2": 2 + }, + "constant": { + "width": 1, + "height": 2 + }, + "horizontalSpacing": 0, + "verticalSpacing": 0 + }, + "data": [ + { + "image": { + "url": "", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "title": "", + "description": "", + "field1": "", + "field2": "", + "field3": "", + "field4": "", + "openInWebView" : false, + "isChapter": false, + "link": { + "url": "", + "method": "", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + } + } + ] + } + ] + } + ], + "search": [ + { + "request": { + "url": "https://raw.senmanga.com/search?s=", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "separator": "+", + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "const DefaultLayouts = { ultraWideFull : 'ultraWideFull', ultraWide : 'ultraWide', wideFull : 'wideFull', wide : 'wide', wideStrechedFull : 'wideStrechedFull', wideStrechedFullDouble : 'WideStrechedFullDouble', wideStreched : 'wideStreched', wideStrechedDouble : 'wideStrechedDouble', wideStrechedFullList : 'wideStrechedFullList', wideStrechedList : 'wideStrechedList', doublets : 'doublets', doubletsDouble : 'doubletsDouble', doubletsFull : 'doubletsFull', doubletsFullDouble : 'doubletsFullDouble', doubletsConstant : 'doubletsConstant', doubletsDoubleConstant : 'doubletsDoubleConstant', doubletsFullConstant : 'doubletsFullConstant', doubletsFullDoubleConstant : 'doubletsFullDoubleConstant', longDoublets : 'longDoublets', longDoubletsDouble : 'longDoubletsDouble', longDoubletsFull : 'longDoubletsFull', longDoubletsFullDouble : 'longDoubletsFullDouble', longDoubletsConstant : 'longDoubletsConstant', longDoubletsDoubleConstant : 'longDoubletsDoubleConstant', longDoubletsFullConstant : 'longDoubletsFullConstant', longDoubletsFullDoubleConstant : 'longDoubletsFullDoubleConstant', triplets : 'triplets', tripletsDouble : 'tripletsDouble', tripletsFull : 'tripletsFull', tripletsFullDouble : 'tripletsFullDouble', tripletsConstant : 'tripletsConstant', tripletsDoubleConstant : 'tripletsDoubleConstant', tripletsFullConstant : 'tripletsFullConstant', tripletsFullDoubleConstant : 'tripletsFullDoubleConstant', longTriplets : 'longTriplets', longTripletsDouble : 'longTripletsDouble', longTripletsFull : 'longTripletsFull', longTripletsFullDouble : 'longTripletsFullDouble', longTripletsConstant : 'longTripletsConstant', longTripletsDoubleConstant : 'longTripletsDoubleConstant', longTripletsFullConstant : 'longTripletsFullConstant', longTripletsFullDoubleConstant : 'longTripletsFullDoubleConstant', none: '' }; const CellDesings = { Special1 : 'Special1', Special2 : 'Special2', Special3 : 'Special3', CELLHelperText : 'CELLHelperText', small1 : 'small1', small2 : 'small2', normal1 : 'normal1', normal2 : 'normal2', normal3 : 'normal3', normal4 : 'normal4', normal5 : 'normal5', normal6 : 'normal6', normal7 : 'normal7', wide1 : 'wide1', wide2 : 'wide2', wide3 : 'wide3', wide4 : 'wide4', wide5 : 'wide5', wide6 : 'wide6', wide7 : 'wide7', wide8 : 'wide8', wide9 : 'wide9', wide10 : 'wide10', wide11 : 'wide11' }; const Paging = { leading : 'leading', centered : 'centered', none : '' }; const Orientation = { horizontal : 'horizontal', vertical : 'vertical' }; function Search(request,extra,separator,javascriptConfig,output) { this.request = request; this.extra = extra; this.separator = separator; this.javascriptConfig = javascriptConfig; this.output = output; } function ModuleRequest(url,method,headers,httpBody) { this.url = url; this.method = method; this.headers = headers; this.httpBody = httpBody; } function Extra(commands,extraInfo) { this.commands = commands; this.extraInfo = extraInfo; } function Commands(commandName,params) { this.commandName = commandName; this.params = params; } function JavascriptConfig(removeJavascript,loadInWebView,javaScript) { this.removeJavascript = removeJavascript; this.loadInWebView = loadInWebView; this.javaScript = javaScript; } function KeyValue(key,value) { this.key = key; this.value = value; } function Output(cellDesing,orientation,defaultLayout,paging,section,layout,data) { this.cellDesing = cellDesing; this.orientation = orientation; this.defaultLayout = defaultLayout; this.paging = paging; this.section = section; this.layout = layout; this.data = data; } function Section(sectionName,separator) { this.sectionName = sectionName; this.separator = separator; } function Layout(insets, visibleCellsWidthS,visibleCellsWidthM,visibleCellsWidthL, visibleCellsHeight, heightForVisibleCells, cellSize, ratio, constant, horizontalSpacing, verticalSpacing) { this.insets = insets; this.visibleCellsWidthS = visibleCellsWidthS; this.visibleCellsWidthM = visibleCellsWidthM; this.visibleCellsWidthL = visibleCellsWidthL; this.visibleCellsHeight = visibleCellsHeight; this.heightForVisibleCells = heightForVisibleCells; this.cellSize = cellSize; this.ratio = ratio; this.constant = constant; this.horizontalSpacing = horizontalSpacing; this.verticalSpacing = verticalSpacing; } function Insets(top,bottom,left,right) { this.top = top; this.bottom = bottom; this.left = left; this.right = right; } function Size(width,height) { this.width = width; this.height = height; } function Ratio(inRelation,number1,number2) { this.inRelation = inRelation; this.number1 = number1; this.number2 = number2; } function Data(image,title,description,field1,field2,field3,field4,isChapter,link,openInWebView) { this.image = image; this.title = title; this.description = description; this.field1 = field1; this.field2 = field2; this.field3 = field3; this.field4 = field4; this.isChapter = isChapter; this.link = link; this.openInWebView = openInWebView; } function quickData(link,image,title,field1)  { return new Data(image,title,'unknown',field1,'unknown','unknown','unknown',false,link); } function shuffle(a) { var j, x, i; for (i = a.length - 1; i > 0; i--) { j = Math.floor(Math.random() * (i + 1)); x = a[i]; a[i] = a[j]; a[j] = x; } return a; } var savedData = document.getElementById('ketsu-final-data'); var parsedJson = JSON.parse(savedData.innerHTML); let output = []; let emptyKeyValue = [new KeyValue('','')]; let found = document.querySelector('.search-body').querySelectorAll('.mng'); let dataArray = []; for(manga of found){ var image = manga.querySelector('.cover img').src; image = new ModuleRequest(image, 'get', emptyKeyValue, null); let title = manga.querySelector('.item-info .series-title a').text.trim(); let type = manga.querySelector('.cover .type').innerText; var link = manga.querySelector('a').href; link = new ModuleRequest(link, 'get', emptyKeyValue, null); let data = new Data(image, title, '', type, '', '', '', false, link); dataArray.push(data); } output.push(new Output(CellDesings.wide6, Orientation.vertical, DefaultLayouts.doubletsFull, Paging.none, new Section('', true), null, dataArray)); let searchPageObject = new Search(new ModuleRequest('','',emptyKeyValue,null),new Extra([new Commands('',emptyKeyValue)],emptyKeyValue),'',new JavascriptConfig(true,false,''),output); var finalJson = JSON.stringify(searchPageObject); savedData.innerHTML = finalJson;" + }, + "output": [ + { + "cellDesing": "normal1", + "orientation": "vertical", + "defaultLayout": "wide", + "paging": "", + "section": { + "sectionName": "", + "separator": false + }, + "layout": { + "insets": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "visibleCellsWidthS": 2, + "visibleCellsWidthM": 2, + "visibleCellsWidthL": 2, + "visibleCellsHeight": 2, + "heightForVisibleCells": 400, + "cellSize": { + "width": 300, + "height": 300 + }, + "ratio": { + "inRelation": "width", + "number1": 1, + "number2": 2 + }, + "constant": { + "width": 1, + "height": 2 + }, + "horizontalSpacing": 0, + "verticalSpacing": 0 + }, + "data": [ + { + "image": { + "url": "", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "title": "", + "description": "", + "field1": "", + "field2": "", + "field3": "", + "field4": "", + "openInWebView" : false, + "isChapter": false, + "link": { + "url": "empty", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + } + ] + } + ] + } + ], + "info": [ + { + "request": { + "url": "", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "function Info(request, extra, javascriptConfig, output) { this.request = request; this.extra = extra; this.javascriptConfig = javascriptConfig; this.output = output; } function ModuleRequest(url, method, headers, httpBody) { this.url = url; this.method = method; this.headers = headers; this.httpBody = httpBody; } function Extra(commands, extraInfo) { this.commands = commands; this.extraInfo = extraInfo; } function Commands(commandName, params) { this.commandName = commandName; this.params = params; } function JavascriptConfig(removeJavascript, loadInWebView, javaScript) { this.removeJavascript = removeJavascript; this.loadInWebView = loadInWebView; this.javaScript = javaScript; } function KeyValue(key, value) { this.key = key; this.value = value; } function Chapter(chapName, link,openInWebView) { this.chapName = chapName; this.link = link; this.openInWebView = openInWebView; } function Output(image, title, link, description, genres, field1, field2, field3, field4, chapters) { this.image = image; this.link = link; this.title = title; this.description = description; this.genres = genres; this.field1 = field1; this.field2 = field2; this.field3 = field3; this.field4 = field4; this.chapters = chapters; } function getStuff(array,match) { for (var x = 0 ; x< array.length;x++) { let data = array[x].innerText; if (data.includes(match)) { return data.replace(match,'').trim(); } } } function getHtmlStuff(array,match) { for (var x = 0 ; x< array.length;x++) { let data = array[x].innerText; if (data.includes(match)) { return array[x]; } } } var savedData = document.getElementById('ketsu-final-data'); var parsedJson = JSON.parse(savedData.innerHTML); let emptyKeyValue = [new KeyValue('', '')]; var episodes = []; if(document.querySelector('.chapter-list') != null) { let episodesArray = document.querySelector('.chapter-list').querySelectorAll('li'); for(ep of episodesArray){ let name = ep.querySelector('.series').innerText; var link = ep.querySelector('.series').href; link = new ModuleRequest(link, 'get', emptyKeyValue, null); episodes.push(new Chapter(name, link, false)); } episodes.reverse(); } var type = document.querySelector('.info').querySelectorAll('.item')[3].innerText.split(' ')[1]; var status = document.querySelector('.info').querySelectorAll('.item')[1].innerText.split(' ')[1]; var genres = []; if(document.querySelector('.item.genre') != null){ let genreArray = document.querySelector('.item.genre').querySelectorAll('a'); for(genre of genreArray){ genres.push(genre.text); } } var desc = document.querySelector('.summary').innerText; var title = document.querySelector('.series').innerText; var image = document.querySelector('.cover img').src; image = new ModuleRequest(image,'get',emptyKeyValue,null); let infoPageObject = new Info(new ModuleRequest('', '', emptyKeyValue, null), new Extra([new Commands('', emptyKeyValue)], emptyKeyValue), new JavascriptConfig(false, false, ''), new Output(image, title, parsedJson.request, desc, genres, status, '', type, 'Chapters: ' + episodes.length, episodes)); var finalJson = JSON.stringify(infoPageObject); savedData.innerHTML = finalJson;" + }, + "output": { + "image": { + "url": "", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "link": { + "url": "", + "method": "get", + "headers": [ + { + "key": "", + "value": "" + } + ], + "httpBody": null + }, + "title": "", + "description": "", + "genres": [ + "" + ], + "field1": "", + "field2": "", + "field3": "", + "field4": "", + "chapters": [ + { + "chapName": "", + "openInWebView": false, + "link": { + "url": "empty", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + } + ] + } + } + ], + "chapters": [ + { + "request": { + "url": "", + "method": "get", + "headers": [ + { + "key": "Cookie", + "value": "viewer=1" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "function Chapters(request, extra, javascriptConfig, output) { this.request = request; this.extra = extra; this.javascriptConfig = javascriptConfig; this.output = output; } function ModuleRequest(url, method, headers, httpBody) { this.url = url; this.method = method; this.headers = headers; this.httpBody = httpBody; } function Extra(commands, extraInfo) { this.commands = commands; this.extraInfo = extraInfo; } function Commands(commandName, params) { this.commandName = commandName; this.params = params; } function JavascriptConfig(removeJavascript, loadInWebView, javaScript) { this.removeJavascript = removeJavascript; this.loadInWebView = loadInWebView; this.javaScript = javaScript; } function KeyValue(key, value) { this.key = key; this.value = value; } function Output( videos, images, text) { this.videos = videos; this.images = images; this.text = text; } function Videos(needsResolver, rawVideo) { this.needsResolver = needsResolver; this.rawVideo = rawVideo; } function NeedsResolver(resolverIdentifier, link) { this.resolverIdentifier = resolverIdentifier; this.link = link; } function RawVideo(video) { this.video = video; } function Video(videoQuality, videoLink) { this.videoQuality = videoQuality; this.videoLink = videoLink; } function Text(text) { this.text = text; } var output = []; var savedData = document.getElementById('ketsu-final-data'); var parsedJson = JSON.parse(savedData.innerHTML); var emptyKeyValue = [new KeyValue('', '')]; let images = []; var imagesArray = document.querySelector('.reader').querySelectorAll('.picture'); for(image of imagesArray){ let imgSrc = image.src; images.push(new ModuleRequest(imgSrc, 'get', emptyKeyValue, null)); } let emptyExtra = new Extra([new Commands('', emptyKeyValue)], emptyKeyValue); var chaptersObject = new Chapters(new ModuleRequest('', '', emptyKeyValue, null), emptyExtra, new JavascriptConfig(false, false, ''), new Output(null, images, null)); var finalJson = JSON.stringify(chaptersObject); savedData.innerHTML = finalJson;" + }, + "output": { + "videos": { + "needsResolver": [ + { + "resolverIdentifier": "", + "link": { + "url": "", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + } + ], + "rawVideo": [ + { + "video": [ + { + "videoQuality": "", + "videoLink": { + "url": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + } + ] + } + ] + }, + "images": [ + { + "url": "empty", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + ], + "text": { + "text": "" + } + } + } + ], + "moduleResolvers": [ + { + "resolverInfo": { + "resolverName": "", + "nameMatches": [ + "" + ], + "developer": "", + "moduleID": "", + "resolverVersion": 1, + "baseURL": "" + }, + "resolver": [ + { + "request": { + "url": "", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": false, + "loadInWebView": false, + "javaScript": "" + }, + "output": { + "moduleID": "", + "video": [ + { + "videoQuality": "720", + "videoLink": { + "url": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + } + } + ] + } + } + ] + } + ], + "responseCodeFunctions": [ + { + "code": 0, + "msgTitle": "", + "msgBody": "", + "type": "normal", + "functions": [ + { + "request": { + "url": "empty", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "" + } + } + ] + } + ], + "helperFunctions": [ + { + "functionName": "example", + "msgTitle": "", + "msgBody": "", + "type": "normal", + "functions": [ + { + "request": { + "url": "empty", + "method": "get", + "headers": [ + { + "key": "key", + "value": "value" + } + ], + "httpBody": null + }, + "extra": { + "commands": [ + { + "commandName": "", + "params": [ + { + "key": "", + "value": "" + } + ] + } + ], + "extraInfo": [ + { + "key": "", + "value": "" + } + ] + }, + "javascriptConfig": { + "removeJavascript": true, + "loadInWebView": false, + "javaScript": "" + } + } + ] + } + ] +}