aboutsummaryrefslogtreecommitdiff
path: root/assets_src
diff options
context:
space:
mode:
authorrtz12 <koenig@fagott.pw>2016-11-13 02:47:19 (UTC)
committerrtz12 <koenig@fagott.pw>2016-11-13 02:47:19 (UTC)
commitc6df1d768240d14e8129b51d6916931f1c4f35db (patch)
tree4aba83338c8a732e0d40887f9cabe3aeaa1f6d26 /assets_src
parentc5517076f492e878a21123ae4bcb927f25bbc0a2 (diff)
Anilist-API in Grilist implementiert
Diffstat (limited to 'assets_src')
-rw-r--r--assets_src/css/materialize_extend.css3
-rw-r--r--assets_src/js/user.js22
2 files changed, 25 insertions, 0 deletions
diff --git a/assets_src/css/materialize_extend.css b/assets_src/css/materialize_extend.css
new file mode 100644
index 0000000..f06d042
--- /dev/null
+++ b/assets_src/css/materialize_extend.css
@@ -0,0 +1,3 @@
1span.badge.new.no-caption::after {
2 content: "";
3}
diff --git a/assets_src/js/user.js b/assets_src/js/user.js
new file mode 100644
index 0000000..c697780
--- /dev/null
+++ b/assets_src/js/user.js
@@ -0,0 +1,22 @@
1import * as dom from './lib/dom';
2
3function externalServiceClick(e) {
4 var row = dom.closest(e.target, (el) => el.classList.contains('authorizable'));
5 if (row === null) {
6 alert('nada');
7 return;
8 }
9 var authType = row.getAttribute('data-auth-type'),
10 authUrl = row.getAttribute('data-auth-url'),
11 coupleUrl = row.getAttribute('data-couple-url');
12 switch (authType) {
13 case 'copy-paste':
14 window.open(authUrl);
15 location.href = coupleUrl;
16 break;
17 }
18}
19
20dom.ready(() => {
21 document.getElementById('external-service-list').addEventListener('click', externalServiceClick, true);
22});