From 50dbb9526b48a25b885b6b657dec4cc083621fe5 Mon Sep 17 00:00:00 2001 From: Pitu <7425261+Pitu@users.noreply.github.com> Date: Wed, 20 Sep 2017 03:03:00 -0300 Subject: =?UTF-8?q?Delete=20album.js=20script=20since=20we=20are=20SSR=20n?= =?UTF-8?q?ow=20on=20that=20route=20=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/album.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 public/js/album.js (limited to 'public/js') diff --git a/public/js/album.js b/public/js/album.js deleted file mode 100644 index d3880ee..0000000 --- a/public/js/album.js +++ /dev/null @@ -1,34 +0,0 @@ -var album = {}; - -album.get = function(album){ - axios.get('/api/album/get/' + album) - .then(function (response) { - document.getElementById('title').innerHTML = response.data.title; - document.getElementById('count').innerHTML = response.data.count + ' files'; - - var container = document.createElement('div'); - container.innerHTML = `
` - document.getElementById('container').appendChild(container); - - var table = document.getElementById('table'); - for(var item of response.data.files){ - var div = document.createElement('div'); - div.className = "column is-2"; - if(item.thumb !== undefined) - div.innerHTML = ``; - else - div.innerHTML = `

.${item.file.split('.').pop()}

`; - table.appendChild(div); - } - }) - .catch(function (error) { - return swal("An error ocurred", 'There was an error with the request, please check the console for more information.', "error"); - console.log(error); - }); -} - -window.onload = function () { - var identifier = document.location.pathname; - identifier = identifier.substring(3, identifier.length); - album.get(identifier); -}; \ No newline at end of file -- cgit v1.2.3