File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,10 @@ async function html2Img(html) {
158158 div . setAttribute ( 'style' , 'padding: 30px 20px;background: #000;color: #f7f4cb;font-family: "LXGW WenKai";max-width: 768px;margin: auto;' ) ;
159159 div . innerHTML = html ;
160160 let containImages = div . getElementsByTagName ( 'img' ) ;
161+ if ( containImages . length > 0 && window . mobileCheck ( ) ) {
162+ launch_toast ( "手机端不支持图片书签,请用电脑浏览器" ) ;
163+ return ;
164+ }
161165 for ( let i = 0 ; i < containImages . length ; i ++ ) {
162166 let originImg = containImages [ i ] ;
163167 let originImgSrc = originImg . getAttribute ( 'src' ) ;
@@ -181,7 +185,6 @@ async function html2Img(html) {
181185 document . body = document . createElement ( "body" ) ;
182186 }
183187 document . body . appendChild ( div ) ;
184- launch_toast ( "请稍等。。失败请用电脑浏览器尝试" ) ;
185188 let canvas = await html2canvas ( div , { allowTaint : true , useCORS : true } ) ;
186189 if ( window . mobileCheck ( ) ) {
187190 document . body = bodyBackup ;
You can’t perform that action at this time.
0 commit comments