PageSourceSearch

https://swallow-incubate.com/sw_wp/wp-content/themes/swinc/js/sns-share.js

js swallow-incubate.com collected 2026-10-02 19:08:37 UTC 755 bytes, 14 lines download raw bytes

1// SNS シェアリンクのポップアップ表示
2// CSP enforce のため footer の onclick 属性から外部ファイル化。
3// 対象は .sns-link 内のリンクで、data-share-window にウィンドウ名を持つもの。
4document.addEventListener('DOMContentLoaded', function () {
5  var links = document.querySelectorAll('.sns-link a[data-share-window]');
6  Array.prototype.forEach.call(links, function (link) {
7    link.addEventListener('click', function (event) {
8      event.preventDefault();
9      var url = encodeURI(decodeURI(this.href));
10      var name = this.getAttribute('data-share-window');
11      window.open(url, name, 'width=650,height=450,menubar=no,toolbar=no,personalbar=no,scrollbars=yes,resizable=yes');
12    });
13  });
14});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.