diff options
| author | Eltrac Koalar <hi@guhub.cn> | 2020-07-16 10:00:14 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-16 10:00:14 +0800 |
| commit | 9c757ad0efc8d0dfa4026940381f01f7fe75200c (patch) | |
| tree | 1802cce99e6c746bb2c29f43d65c836bbb4ad072 | |
| parent | 00646ca95266c8b37ab56453e972fbb81c8aa927 (diff) | |
| parent | 7ab1f43fdb3282bb7340cb1a002240717616a13f (diff) | |
Merge pull request #71 from kengwang/master
🧷 Fixed: 改进懒加载
| -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;}; |
