diff options
| author | Kengwang <1136772134@qq.com> | 2020-07-16 09:17:24 +0800 |
|---|---|---|
| committer | Kengwang <1136772134@qq.com> | 2020-07-16 09:17:24 +0800 |
| commit | 7ab1f43fdb3282bb7340cb1a002240717616a13f (patch) | |
| tree | 1802cce99e6c746bb2c29f43d65c836bbb4ad072 /assets/js | |
| parent | 00646ca95266c8b37ab56453e972fbb81c8aa927 (diff) | |
🧷 Fixed: 改进懒加载
使懒加载支持 ReferrerPolicy 以便绕过B站的同源检测
根据 GPLv3 协议,文件中已对修改进行说明和署名
Diffstat (limited to 'assets/js')
| -rw-r--r-- | assets/js/gazeimg.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/assets/js/gazeimg.js b/assets/js/gazeimg.js index 4553754..2edf649 100644 --- a/assets/js/gazeimg.js +++ b/assets/js/gazeimg.js @@ -12,10 +12,15 @@ // http://www.ganxiaozhe.com/p/gazeimg/ // Copyright 2020 Ganxiaozhe // +// +// 根据 GPLv3 协议,下面是对此文件的修改说明 +// + 添加对 ReferrerPolicy 的支持以便绕过同源检测 => Line: 294 +// -- @kengwang at 2020/07/16 +// // ================================================== ;(function($,window,document){ 'use strict'; - + if(!$) {return '缺少JQuery!';} let g = {t:{}}; g.colors = [ @@ -286,6 +291,9 @@ $(window).scroll(function(){ if( t.ietop < t.deh ){ let i = new Image(); i.src = $(this).attr('data-gisrc'); + if (this.referrerPolicy==="no-referrer"){ + i.referrerPolicy="no-referrer"; + } i.obj = $(this); if (i.complete) {icomplete(i.obj);return;}; |
