Skip to content

Commit

Permalink
update the embed script to use a dynamic variable
Browse files Browse the repository at this point in the history
  • Loading branch information
fredfalcon committed Feb 28, 2023
1 parent c7b3879 commit 3e1af19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions website/static/js/embed.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
$(document).ready(function () {
// change this to be the server where blt is hosted
var fqdn = "https://www.hosted-blt-server.com";
var button = document.createElement("Button");
button.style = "bottom:15px;left:15px;position:fixed;z-index: 12;border-radius:100%;background-color:white; background: white url('https://www.bugheist.com/static/img/logo.png') no-repeat center; height: 50px; width: 50px; outline: none;background-size: 30px 30px;"
button.style = "bottom:15px;left:15px;position:fixed;z-index: 12;border-radius:100%;background-color:white; background: white url('" + fqdn + "') no-repeat center; height: 50px; width: 50px; outline: none;background-size: 30px 30px;"
document.body.appendChild(button);
var url = window.location.href;
var redirect_url = 'https://www.bugheist.com/report/?url=' + url;
var redirect_url = fqdn + url;
button.onclick = function () {
var redirectWindow = window.open(redirect_url, '_blank');
redirectWindow.location;
Expand Down

0 comments on commit 3e1af19

Please sign in to comment.