From 7ab1f43fdb3282bb7340cb1a002240717616a13f Mon Sep 17 00:00:00 2001 From: Kengwang <1136772134@qq.com> Date: Thu, 16 Jul 2020 09:17:24 +0800 Subject: =?UTF-8?q?=F0=9F=A7=B7=20Fixed:=20=E6=94=B9=E8=BF=9B=E6=87=92?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使懒加载支持 ReferrerPolicy 以便绕过B站的同源检测 根据 GPLv3 协议,文件中已对修改进行说明和署名 --- assets/js/gazeimg.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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;}; -- cgit v1.2.3