From 9257059fa7a8997fd70f97c348dd195db01eb355 Mon Sep 17 00:00:00 2001 From: Elijah Cohen Date: Thu, 28 Jan 2021 20:22:47 -0600 Subject: [PATCH] backend for comics project done --- comics.js | 38 ++++++++++++++++++++++++++++++++++++++ index.html | 12 ++++++++++++ negative.png | Bin 0 -> 21233 bytes node/index.js | 25 +++++++++++++++++++++++++ node/runner.sh | 9 +++++++++ 5 files changed, 84 insertions(+) create mode 100644 comics.js create mode 100644 index.html create mode 100644 negative.png create mode 100644 node/index.js create mode 100755 node/runner.sh diff --git a/comics.js b/comics.js new file mode 100644 index 0000000..ef7db7e --- /dev/null +++ b/comics.js @@ -0,0 +1,38 @@ + + +function onload() { + //imgtag = document.getElementById("image") + //imgtag.src = "negative.png" + //imgtag.src = "https://qwantz.com/comics/comic2-3900.png" + + + drawcomic("https://qwantz.com/comics/comic2-675.png") + + + num = window.location.search.substring(window.location.search.indexOf('=')+1) + getimageurl(num) +} + +function getimageurl(number) { + // takes the comic no (from the ?comic=<>) and gets the url we want + // returns a promise? + console.log(number) + fetch("https://qwantz.com/index.php?comic=" + number, {mode: "cors"}) +} + + +function drawcomic(imgurl) { + canvas = document.getElementById("canvas") + ctx = canvas.getContext('2d') + img = new Image() + mask = new Image() + mask.onload = function() { + ctx.drawImage(img,0,0) + ctx.drawImage(mask,0,0) + } + img.onload = function() { + mask.src = "negative.png" + } + img.src = imgurl + //img.src = "https://qwantz.com/comics/comic2-675.png" +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..03f0791 --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + Comics + + + + + + + diff --git a/negative.png b/negative.png new file mode 100644 index 0000000000000000000000000000000000000000..80cbc516e6642453633c6242f7cab69c03c13b87 GIT binary patch literal 21233 zcmce-WpG?g&@Q$sTrtaH23yQ%F*CC)W@ct)W{WLmicC~-?jyv(?VfpDR@7pVX_~qqLbr-ua@7B|^&XM=dUVwn>BG%^P z!lPghUzh9UR8dFH>Ghn`=EquVVAF;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)kI2S-DoiYTUWZ|RkCfs{(<^JoC-fo_osDSLJQ0f+&^fH?t)hLZ@U<6 z+Kt1(t3ei4sP-M`Ww(@94lK&YB}^3FZh#*p4XmxWsqukAZ7Wlt9RinJ^f<^Rt5ufw ze+d--QkA8oXHBleMD;&1zr3{Lg~sG%Oq(;8jnduZHtheMFVk)<{(k{Ts|p9g{F{dH ff7lF1CG!Lj=s{_R+qR-PGJxN&+g_`;^i29Mumd8W literal 0 HcmV?d00001 diff --git a/node/index.js b/node/index.js new file mode 100644 index 0000000..2b0d1a4 --- /dev/null +++ b/node/index.js @@ -0,0 +1,25 @@ + +const express = require('express') +const fetch = require('node-fetch') +const jsdom = require('jsdom') +const { JSDOM } = jsdom +const app = express() +const port = 4453 + + +app.get('/id/:num', (req, res) => { + fetch("https://qwantz.com/index.php?comic=" + req.params["num"]) + .then(response => { + return response.text() + }).then(s => { + var { document } = (new JSDOM(s)).window + res.send(document.getElementsByClassName('comic')[0].src) + }) + .catch(() => { + res.send("error!") + }) +}) + +app.listen(port, () => { + console.log("listening") +}) diff --git a/node/runner.sh b/node/runner.sh new file mode 100755 index 0000000..1e956be --- /dev/null +++ b/node/runner.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# runner for comics api thingy + + +while : +do + node index.js +done -- 2.39.2