PageSourceSearch

https://www.solarehotels.com/static/js/bookmark_ga.js

js solarehotels.com collected 2026-09-24 10:44:43 UTC 1,316 bytes, 37 lines download raw bytes

1
2/*サービスワーカーの登録*/
3window.addEventListener('load', function() {
4  if ('serviceWorker' in navigator) {
5    navigator.serviceWorker.register("/serviceWorker.js")
6      .then(function(registration) {
7        console.log("serviceWorker registed.");
8      }).catch(function(error) {
9        console.warn("serviceWorker error.", error);
10      });
11    }
12  });
13
14/*ユーザーアクションをイベントリスナーでキャッチ*/
15self.addEventListener('beforeinstallprompt', function(e) {
16  // beforeinstallprompt Event fired
17  // e.userChoice will return a Promise. 
18//  var dataLayer = dataLayer || [];
19  e.userChoice.then(function(choiceResult) {
20    console.log(choiceResult.outcome);
21
22    if(choiceResult.outcome == 'dismissed') {/*ユーザーがホームに追加しなかった場合*/
23      console.log('User cancelled home screen install');
24      dataLayer.push({ 
25        'event' : 'a2hs_cancell',
26        'a2hs_add' : 'no_add'
27      });
28    }
29    else {/*ユーザーがホームに追加した場合*/
30      console.log('User added to home screen');
31      dataLayer.push({ 
32        'event' : 'a2hs',/*Eventにa2hsが送られることでGTMタグが発火*/
33        'a2hs_add' : 'add'/*GAにこの変数が連携される*/
34      });
35    }
36  });
37});

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.