0
我爲我的網站創建了一個谷歌瀏覽器擴展程序。當我在瀏覽器上運行我的網頁時,我需要自動安裝此擴展程序..我想將打包的擴展程序放在我自己的站點中。是否有可能在我自己的網站上託管我的擴展。請教我如何在運行我的頁面時自動安裝該擴展,以及如何可以在我自己的服務器上進行託管。我可以在我的網站上託管谷歌瀏覽器擴展程序
在此先感謝..
我爲我的網站創建了一個谷歌瀏覽器擴展程序。當我在瀏覽器上運行我的網頁時,我需要自動安裝此擴展程序..我想將打包的擴展程序放在我自己的站點中。是否有可能在我自己的網站上託管我的擴展。請教我如何在運行我的頁面時自動安裝該擴展,以及如何可以在我自己的服務器上進行託管。我可以在我的網站上託管谷歌瀏覽器擴展程序
在此先感謝..
您應該使用Inline Installation爲用戶輕鬆安裝您的應用。
如下
<div id="p2r_addon_inst" class="myclass">
<div id="chrome_info" style="display: block; top: 0px;">
<div id="addon_install_icon"></div>
<span id="addon_install_message">Chrome extension is available for this site <a href="your link">More info...</a> </span>
<div id="addon_install_buttonblock">
<div id="addon_install_remove"></div>
<button id="addon_install_extinstallbutton">Install</button>
<button id="addon_install_dontaskagain">Don't ask again</button>
</div>
</div>
</div>
和CSS是
.myclass{
position: absolute;
left: 0;
top: 0;
width: 100%;
overflow: visible;
z-index: 999;
}
您可以創建一個簡單的彈出窗口,重定向到該網站的代碼