Enabling Inline Installation For Google Sheets Add On

Viewed 208

I have devloped a Google Spreadsheet Add On. I am trying to add Inline Installation option on my website. But my addon is being added as a Google Chrome Extension rather a normal add on installation.

Expected outcome: Installation of Add-On on user's account. Here is gist of code:

<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>

So my question is: Is it possible to do it? If yes, how do I enable inline installation for Google Spreadsheet AddOn?

Help is much appreciated. Thank You.

2 Answers
Related