Skip to content

Commit

Permalink
fix firefox settings not working + remove console log
Browse files Browse the repository at this point in the history
  • Loading branch information
mdolr committed Oct 10, 2020
1 parent bfb0362 commit a4afdd0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ document.addEventListener('DOMContentLoaded', () => {
function insertSurvolDiv() {
return new Promise((resolve) => {
container.className = `survol-container ${darkTheme ? 'dark-theme' : ''} hidden`;
container.id = "survol-container";
container.id = 'survol-container';

//set the buffer (popup distance from mouse)
const buffer = 20;
Expand Down Expand Up @@ -196,7 +196,7 @@ document.addEventListener('DOMContentLoaded', () => {


// If the script is part of the extension
if (window.chrome && chrome.runtime && chrome.runtime.id) {
if ((window.chrome && chrome.runtime && chrome.runtime.id) || chrome) {
chrome.storage.local.get(['disabledDomains', 'previewMetadata', 'darkThemeToggle'], function (res) {
let disabledDomains = res.disabledDomains ? res.disabledDomains : ['survol.me'];

Expand Down
1 change: 0 additions & 1 deletion js/templates/soundcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class SoundCloudHover {
.survolBackgroundRequest(`https://soundcloud.com/oembed?url=${this.redirectLink}&format=json`)
.then((res) => {

console.log('res:', res);
let soundCloudContainer = document.createElement('div');
soundCloudContainer.className = 'survol-soundcloud-container';

Expand Down
4 changes: 1 addition & 3 deletions js/templates/stackexchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ class StackExchangeHover {
}

generateEmbed(container, node, data) {
console.log('Generating embed', data);


// Re-using reddit code
const generated = document.createElement('div');
Expand Down Expand Up @@ -230,7 +228,7 @@ class StackExchangeHover {
postContainer.className = 'survol-tooltiptext survol-tooltiptext-reddit-post';
postContainer.appendChild(generated);

if (window.lastHovered == node) {
if (window.lastHovered == node && container.innerHTML == '') {
container.appendChild(postContainer);
}
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manifest_version": 2,
"version": "0.5.2",
"version": "0.5.3",
"name": "__MSG_extensionName__",
"short_name": "__MSG_extensionShortName__",
"description": "__MSG_extensionDescription__",
Expand Down

0 comments on commit a4afdd0

Please sign in to comment.