久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

在 chrome 中阻止 gdrive 授權的彈出窗口

Popup blocking the gdrive authorization in chrome(在 chrome 中阻止 gdrive 授權的彈出窗口)
本文介紹了在 chrome 中阻止 gdrive 授權的彈出窗口的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

所以,問題在于彈出窗口會阻止窗口打開,即使它是由用戶操作完成的,例如單擊..

So, the problem is that popup blocking the window open even if it is done by a user action, click for example..

gapi.auth.authorize({
   client_id: this.client_id,
   scope: this.scopes,
   access_type: 'online',
   immediate: immediate
}, function(authResult) {
   console.log(authResult)
});

如果我只是在用戶點擊此處打開窗口:

If i simply open the window on user click as here:

$('.some').click(funciton(){
    window.open(someurl)
})

它工作正常,但如果我這樣做了,它會拋出 gdrive api(gapi.auth.authorize),無論如何都會阻塞.

it works fine, but if i did it throw the gdrive api(gapi.auth.authorize), this blocking anyway.

必須,我不能強迫用戶關閉彈出窗口阻止.我希望任何人現在如何解決它:),謝謝

A must, I can not force users to off popap blocking. I hope that anybody now how solved it :), thanks

推薦答案

試試這個:

在對 client.js 的調用中包含一個 onload 事件

Include an onload event in your call to client.js

<script type="text/javascript" src="https://apis.google.com/js/client.js?onload=handleClientLoad"></script>

從 onload 函數調用 gapi.auth.init:

Call gapi.auth.init from the onload function:

function handleClientLoad() { window.setTimeout(gapi.auth.init,1);}

在您的授權配置中設置立即:false.

In your authorize configuration set immediate: false.

檢查頁面流中 1. 是否低于 2..

Check that 1. is below 2. in the flow of the page.

這篇關于在 chrome 中阻止 gdrive 授權的彈出窗口的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機器人提及發出該機器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復必須使用導入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務器時的歡迎消息)
主站蜘蛛池模板: 欧美性受 | 日本成人福利视频 | 精品一区二区av | 一级毛片在线播放 | 找个黄色片 | 国产成人在线视频 | 成人在线精品视频 | 亚洲福利一区二区 | 99精品国产一区二区三区 | 麻豆国产一区二区三区四区 | 一区二区视频在线 | 国产又爽又黄的视频 | 91色综合| 精品欧美激情在线观看 | 成人免费淫片aa视频免费 | 国产成人久久精品一区二区三区 | 嫩草视频网站 | 亚洲一区二区三区免费在线 | 国产亚洲精品一区二区三区 | 天天干天天草 | 亚洲成人一区二区 | 欧美一级黄色网 | 久久国内精品 | 91精品国产自产精品男人的天堂 | 久久久久国产精品 | 欧美a级成人淫片免费看 | 91国产视频在线观看 | 91精品国产一区二区三区 | 亚洲电影一区二区三区 | 亚洲午夜视频在线观看 | 国产91亚洲精品一区二区三区 | 中文字幕不卡一区 | 欧美8一10sex性hd | 日韩一区二区三区视频 | 国产激情一区二区三区 | 99re99| 国产乱xxav| 精品一二区| 久久精品色欧美aⅴ一区二区 | 国产精品久久精品 | 欧美成人精品 |