Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added modal to check if chrome browser #531

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions create.html
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,18 @@ <h4 class="modal-body text-danger" :style="{display: !getID() ? 'block' : 'none'
</div>
</div>
</div>

<div id="chromeModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">WoofJS is Optimized for Chrome!</h4>
</div>
<h4 class="modal-body text-danger">WoofJS.com works best with the Chrome web browser. We're a small team, so we can't test new features on all browsers. If you are having difficulties with WoofJS.com, consider<a href="https://www.google.com/chrome/"> downloading Chrome here</a>.</h4>
</div>
</div>
</div>

<div id="docsbar" v-show="docsbar" @click="docsbar= !docsbar" :style="{display: 'flex'}">
<span class="rotate" style="font-size: 1.65em">Documentation</span>
Expand Down Expand Up @@ -1690,6 +1702,21 @@ <h4 class="modal-body text-danger" :style="{display: !getID() ? 'block' : 'none'
// helper function to prevent runCode from running too often
var debouncedRunCode = debounce(runCode, 1000, false)

function isChromeBrowser() {
const userAgent = window.navigator.userAgent;
if (userAgent.indexOf("Edge") == -1 && userAgent.indexOf("OPR") == -1 && userAgent.indexOf("Firefox") == -1 && userAgent.indexOf("Trident") == -1) {
return true;
}
else{
return false;
}

};
if (!(isChromeBrowser())&&((document.cookie).indexOf("notChrome")==-1)) {
document.cookie="notChrome"
$("#chromeModal").modal("show");
};

</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
Expand Down