PageSourceSearch

https://www.audicable.com/assets/js/dl-redirect.js

js audicable.com collected 2026-10-05 19:54:23 UTC 3,014 bytes, 73 lines download raw bytes

1(function () {
2  /**
3   * Convert NodeList to Array
4   */
5  function toArr(list) {
6    return list.length ? Array.prototype.slice.call(list) : [];
7  }
8
9  /**
10   * Detect browser type
11   */
12  function browserRedirect() {
13    var sUserAgent = navigator.userAgent.toLowerCase();
14    return /ipad|iphone os|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/i.test(sUserAgent) ? 'phone' : 'pc';
15  }
16
17  /**
18   * Check if the link is a download link
19   */
20  function isDownloadLink(url) {
21    return /\.(exe|dmg|zip)$/i.test(url);
22  }
23
24  /**
25   * Add download guidance listener
26   */
27  function addDownloadGuidanceListener(item) {
28    item.addEventListener('click', function (e) {
29      e.preventDefault();
30      e.stopPropagation();
31
32      var pathname = this.pathname;
33      var index = pathname.lastIndexOf('/');
34      var target = pathname.slice(index + 1, pathname.length - 4); // 提取文件名(去掉扩展名)
35
36      if (hrefMap[target]) {
37        var helpUrl = hrefMap[target];
38
39        // 判断是否是完整的 URL(如 'http' 开头)
40        if (!/^https?:\/\//.test(helpUrl)) {
41          helpUrl = window.location.origin + helpUrl; // 处理内部链接
42        }
43
44        window.open(helpUrl, '_blank', 'noopener,noreferrer'); // 打开帮助页面
45      } else {
46        window.open(item.getAttribute('href'), '_blank'); // 直接下载
47      }
48    });
49  }
50
51  if (browserRedirect() === 'phone') {
52    var downloadLinks = toArr(document.querySelectorAll('a[href*=".exe"], a[href*=".dmg"], a[href*=".zip"]'));
53    var hrefMap = {
54      'audicable-setup': 'https://www.audicable.com/audio-recorder/guide.html',
55      'audifab-spotify-music-converter': 'https://www.audifab.com/spotii-music-converter/online-help.html',
56	  'audifab-apple-music-converter': 'https://www.audifab.com/applee-music-converter/online-help.html',
57	  'audifab-amazon-music-converter': 'https://www.audifab.com/amazoo-music-converter/online-help.html',
58	  'noteburner-spotify-music-converter': 'https://www.noteburner.com/sp-music-converter-windows/tutorial-android.html',
59	  'noteburner-youtube-music-converter': 'https://www.noteburner.com/youtube-music-converter-windows/tutorial.html',
60	  'noteburner-tidal-music-converter': 'https://www.noteburner.com/tidal-music-converter-windows/tutorial.html',
61	  'noteburner-line-music-converter': 'https://www.noteburner.com/line-music-converter-windows/tutorial-android.html',
62	  'noteburner-amazon-video-downloader': 'https://www.noteburner-video.com/amazon-video-downloader-for-windows/tutorial.html',
63	  'noteburner-video-downloader': 'https://www.noteburner-video.com/all-in-one-downloader/tutorial.html',
64	  'netflix-video-downloader': 'https://www.noteburner-video.com/netflix-video-downloader-for-windows/tutorial.html',
65    };
66
67    downloadLinks.forEach(function (item) {
68      if (isDownloadLink(item.getAttribute('href'))) {
69        addDownloadGuidanceListener(item);
70      }
71    });
72  }
73})();

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.