adhesiones-jekyll-theme 0.4.2 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/assets/js/script.js DELETED
@@ -1,49 +0,0 @@
1
- const loadEvent = () => {
2
- try {
3
- if (Turbolinks) return 'turbolinks:load'
4
- } catch {
5
- return 'DOMContentLoaded'
6
- }
7
- }
8
-
9
- document.addEventListener(loadEvent(), () => {
10
- document.querySelectorAll('.print').forEach(print => {
11
- print.addEventListener('click', e => {
12
- event.preventDefault();
13
- event.stopPropagation();
14
- window.print();
15
- });
16
- });
17
-
18
- document.querySelectorAll('.share').forEach(share => {
19
- share.addEventListener('click', event => {
20
- if (!Navigator.share) return;
21
-
22
- event.preventDefault();
23
- event.stopPropagation();
24
-
25
- const title = document.querySelector('title').text;
26
-
27
- try {
28
- const text = document.querySelector('meta[property="og:description"]').content;
29
- } catch {
30
- const text = '';
31
- }
32
-
33
- try {
34
- const url = document.querySelector('link[rel=canonical]').href;
35
- } catch {
36
- const url = document.location.href;
37
- }
38
-
39
- const data = { title: title, text: text, url: url };
40
-
41
- if (Navigator.canShare(data)) Navigator.share(data).then();
42
- });
43
- });
44
-
45
- document.querySelectorAll("a[href^='http://'],a[href^='https://'],a[href^='//']").forEach(a => {
46
- a.rel = "noopener";
47
- a.target = "_blank";
48
- });
49
- });