JSFiddle - React, Tailwind, and code Playground

by oshliaer

HTML

<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<div class="container" ng-controller="Main">
    <div class="row">
        <div class="col-lg-12">
             <h1>How to...</h1>
        </div>
        <div class="col-lg-12">
            <h3>use the string notation <span class="notranslate">"present"</span> to change a preview of the  <span class="notranslate">Google Presentations</span>
            </h3>
        </div>
        <hr>
        <div class="col-lg-12">
            <div class="form-group">
                <label for="txt"><span class="notranslate">1. </span>Copy your <span class="notranslate"> Google Presentation's ID</span> to the clipboard
                </label>
                <div class="img1"></div>
             </div>
        </div>
              <div class="col-lg-12">
            <div class="form-group">
                <label for="txt"><span class="notranslate">2. </span>Paste your <span class="notranslate"> Google Presentation's ID</span> from the clipboard
                </label>  
                <input type="text" class="form-control" ng-model="yourName"   value="" />
            </div>
        </div>
        <hr>
        <div class="col-lg-12">
            <div class="form-group">
                <label for="url"><span class="notranslate">3. </span>Take the link</label>
                <div class="input-group">
                    <input id="url" type="text" class="form-control" value="https://docs.google.com/presentation/d/{{yourName}}/present" />
                     <span class="input-group-btn">
                    <button class="btn btn-primary" type="button" onclick="popitup(document.getElementById('url').value)">TEST</button>
                </span>
                </div>
                <div><a href="https://docs.google.com/presentation/d/{{yourName}}/present" target="_blank">https://docs.google.com/presentation/d/{{yourName}}/present</a></div>
            </div>
<!--...

CSS

</style>
<meta name="google-translate-customization" content="248ac0c6378fcad8-8b00104b9c779bb8-g6571e079b2f05143-2c"></meta>
<style>
</style>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<style>
#google_translate_element {
    display:inline;
    text-align: right;
}
.img1 {
    height: 50px;
    background-repeat: no-repeat;
    background-size:contain;
    background-image:...

JavaScript

/* Google Drive tip #1
how to open presentation in new tab or window with JS or HTML
sources:
resource http://stackoverflow.com/a/10297484/1393023
http://code.angularjs.org/1.1.1/
http://getbootstrap.com/dist/css/bootstrap.css
*/
function Main($scope) {
  $scope.yourName = '1EtUKi3UqJyaspB6iC2WlnoRm3IdUlGaQ3fym9B8qFmk';
}

function popitup(url) {
    var params = [
        'height=' + screen.height,
        'width=' + screen.width,
        'fullscreen=yes' // only works in IE, but here for completeness
    ].join(',');
    // and any other options from
    // https://developer.mozilla.org/en/DOM/window.open
    newwindow = window.open(url, 'name', params);
    popup.moveTo(0, 0);
    if (window.focus) {
        newwindow.focus();
    }
    return true;
}

function googleTranslateElementInit() {
    new google.translate.TranslateElement({
            pageLanguage: 'en',
            layout: google.translate.TranslateElement.InlineLayout.SIMPLE,
            autoDisplay: false
        }, 'google_translate_element');
}