我已經開發了一個Google Spreadsheet Add On。我正在嘗試在我的網站上添加Inline Installation選項。但是我的插件正在被添加爲Google Chrome擴展程序,而不是常規的安裝補充程序。啓用Google表格的內聯安裝Add On
預期結果:在用戶帳戶上安裝附件。 這裏的代碼要點:
<html>
<head>
<title>Inline Installtion</title>
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/jjkkhnadaddgofdoapkbdemklgkcnmld">
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" />
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="section">
<div class="row">
<div class="col-sm-2">
<div class="">
<h5 class=""></h5>
</div>
</div><!-- left div/column -->
<div class="col-sm-8 form_div">
<br>
<br>
<br>
<br>
<div class="form-group main_button">
<div class="col-lg-10 col-lg-offset-2">
<div class="col-lg-4"></div>
<div class="col-lg-4">
<button type="submit" class="btn btn-primary" id="install-button">Add to Chrome</button>
</div>
<div class="col-lg-4"></div>
</div>
</div>
</div>
<div class="col-sm-2">
<div class="">
<h5 class="center"></h5>
</div>
</div><!-- right div/column -->
</div><!-- row -->
</div><!-- section -->
</div><!-- container -->
<script>
$(document).ready(function() {
function successCallback(e)
{
console.log("Success");
console.log(e);
}
function failureCallback(e)
{
console.log("Failure");
console.log(e);
}
$("#install-button").click(function(event) {
chrome.webstore.install("https://chrome.google.com/webstore/detail/jjkkhnadaddgofdoapkbdemklgkcnmld", successCallback, failureCallback);
});
});
</script>
</body>
</html>
所以我的問題是:是否有可能做到這一點?如果是,我如何啓用Google Spreadsheet AddOn的內聯安裝?
非常感謝幫助。謝謝。
我已經完成了,但我想要一個安裝按鈕在我的網站上,就像一個'內嵌安裝'按鈕。 –