diff --git a/build/chrome/background/background.js b/build/chrome/background/background.js index 85694cc..97a83da 100644 --- a/build/chrome/background/background.js +++ b/build/chrome/background/background.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var t=document;"loading"==t.readyState?t.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}function GDEStorage(){var e=this;function r(){return null!=window.localStorage&&(window.localStorage[STORAGE_BASE]||isObject(window.localStorage[STORAGE_BASE])||(window.localStorage[STORAGE_BASE]=JSON.stringify(STORAGE_DEFAULT_PARAMS)),!0)}e.init=function(){return r(),!0},e.getValue=function(e){r();var t=window.localStorage[STORAGE_BASE];return t=JSON.parse(t),e===STORAGE_KEY_ALL?t:t[e]},e.setValue=function(e,t){r();var n=window.localStorage[STORAGE_BASE];return(n=JSON.parse(n))[e]=t,window.localStorage[STORAGE_BASE]=JSON.stringify(n),!0},e.logout=function(){return null!=window.localStorage&&(e.setValue(STORAGE_KEY_LOGGED_IN,!1),!0)}}chrome.browserAction.onClicked.addListener(function(){chrome.tabs.create({url:"index.html"})}),chrome.runtime.onMessage.addListener(function(e,t,n){var r=e.action||"";if(r===BACKGROUND_ACTION_OPEN_POPUP){var o=e.url||"",_=e.height||0,E=screen.width,i=screen.height-_,A=chrome.extension.getURL("popup/popup.html?url="+o),a=gdes.getValue(WINDOW_SIDEBAR_UNAVAILABLE_ENABLED);if(BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&!a)return chrome.runtime.sendMessage({url:o}),!0;chrome.windows.create({url:A,width:420,height:_,top:i,left:E,type:"popup"})}else if(r===BACKGROUND_ACTION_GET_KEY){if(!(l=e.key||""))return n&&n(null),!0;var S=gdes.getValue(l);n&&n(S)}else if(r===BACKGROUND_ACTION_SET_KEY){var l=e.key||"";S=e.value||"";if(!l)return!0;gdes.setValue(l,S)}return!0});var gdes=new GDEStorage;gdes.init(); \ No newline at end of file +var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.4"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var t=document;"loading"==t.readyState?t.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}function GDEStorage(){var e=this;function r(){return null!=window.localStorage&&(window.localStorage[STORAGE_BASE]||isObject(window.localStorage[STORAGE_BASE])||(window.localStorage[STORAGE_BASE]=JSON.stringify(STORAGE_DEFAULT_PARAMS)),!0)}e.init=function(){return r(),!0},e.getValue=function(e){r();var t=window.localStorage[STORAGE_BASE];return t=JSON.parse(t),e===STORAGE_KEY_ALL?t:t[e]},e.setValue=function(e,t){r();var n=window.localStorage[STORAGE_BASE];return(n=JSON.parse(n))[e]=t,window.localStorage[STORAGE_BASE]=JSON.stringify(n),!0},e.logout=function(){return null!=window.localStorage&&(e.setValue(STORAGE_KEY_LOGGED_IN,!1),!0)}}chrome.browserAction.onClicked.addListener(function(){chrome.tabs.create({url:"index.html"})}),chrome.runtime.onMessage.addListener(function(e,t,n){var r=e.action||"";if(r===BACKGROUND_ACTION_OPEN_POPUP){var o=e.url||"",_=e.height||0,E=screen.width,i=screen.height-_,A=chrome.extension.getURL("popup/popup.html?url="+o),a=gdes.getValue(WINDOW_SIDEBAR_UNAVAILABLE_ENABLED);if(BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&!a)return chrome.runtime.sendMessage({url:o}),!0;chrome.windows.create({url:A,width:420,height:_,top:i,left:E,type:"popup"})}else if(r===BACKGROUND_ACTION_GET_KEY){if(!(l=e.key||""))return n&&n(null),!0;var S=gdes.getValue(l);n&&n(S)}else if(r===BACKGROUND_ACTION_SET_KEY){var l=e.key||"";S=e.value||"";if(!l)return!0;gdes.setValue(l,S)}return!0});var gdes=new GDEStorage;gdes.init(); \ No newline at end of file diff --git a/build/chrome/content/all/script/script.js b/build/chrome/content/all/script/script.js deleted file mode 100644 index e9de73c..0000000 --- a/build/chrome/content/all/script/script.js +++ /dev/null @@ -1,4 +0,0 @@ -/* Automatically generated file. Do not edit directly. -Copyright (C) 2019 Gab AI, Inc. -All Rights Reserved */ -var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",COLOR_GAB_GREEN="#21cf7b",isObject=function(t){return!isArray(t)&&!isDate(t)&&(null!==t&&"object"==typeof t)},isString=function(t){return"string"==typeof t||t instanceof String},isDate=function(t){return!isString(t)&&!isArray(t)&&null!=t&&null!=t&&(t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t))},isArray=function(t){return Array.isArray(t)};function ready(t){var e=document;"loading"==e.readyState?e.addEventListener("DOMContentLoaded",t):t()}function getQueryStringValue(t){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var GDAll=function(){var t=function(){function t(){var t=document.getElementById("disqus_thread");if(!t)return!1;var e=function(){var t=document.createElement("div");t.style.setProperty("display","block","important"),t.style.setProperty("width","100%","important"),t.style.setProperty("height","80px","important"),t.style.setProperty("padding","20px 0","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("box-sizing","border-box","important");var e=document.createElement("a");return e.textContent="View Comments on Dissenter",e.style.setProperty("display","block","important"),e.style.setProperty("width","100%","important"),e.style.setProperty("height","40px","important"),e.style.setProperty("background-color",COLOR_GAB_GREEN,"important"),e.style.setProperty("color","#fff","important"),e.style.setProperty("border-radius","4px","important"),e.style.setProperty("text-align","center","important"),e.style.setProperty("margin","0 auto","important"),e.style.setProperty("line-height","40px","important"),e.style.setProperty("font-size","14px","important"),e.style.setProperty("box-sizing","border-box","important"),e.style.setProperty("cursor","pointer","important"),t.appendChild(e),t}();return t.parentElement.insertBefore(e,t),e.onclick=r,!0}function r(){var t=window.location.href,e=window.innerHeight;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_OPEN_POPUP,url:t,height:e})}this.init=function(){t()}};this.init=function(){(new t).init()}};ready(function(){setTimeout(function(){(new GDAll).init()},5e3)}); \ No newline at end of file diff --git a/build/chrome/content/reddit/script/script.js b/build/chrome/content/reddit/script/script.js index 87bf2fb..ceb438f 100644 --- a/build/chrome/content/reddit/script/script.js +++ b/build/chrome/content/reddit/script/script.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(t){return!isArray(t)&&!isDate(t)&&(null!==t&&"object"==typeof t)},isString=function(t){return"string"==typeof t||t instanceof String},isDate=function(t){return!isString(t)&&!isArray(t)&&null!=t&&null!=t&&(t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t))},isArray=function(t){return Array.isArray(t)};function ready(t){var e=document;"loading"==e.readyState?e.addEventListener("DOMContentLoaded",t):t()}function getQueryStringValue(t){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var GDReddit=function(){var a=[];function s(){var t=document.querySelectorAll('a[data-click-id="comments"][data-test-id="comments-page-link-num-comments"]');if(!t)return!1;for(var e=0;e Dissenter Extension - Options

Dissenter Extension — Options

Close this page when you're done
Content Scripts"Content scripts" are scripts that run in specific web pages. By using the standard Document Object Model (DOM), these scripts are able to make changes to those websites in order to enhance the experience.
About Browser Permissions

Active Tab: The "Active Tab" permission gives this extension temporary access to the currently active tab when the you invoke the extension.  -Access to the tab lasts while the you are on that page, and is revoked when the you navigates away or closes the tab.

Contact

If you have any questions, ideas, bugs or anything else, please post a new gab using the hashtag: #DissenterExtension.

Your question, idea or bug may have already been posted by someone else, please have a look at the most recent posts using hashtag #DissenterExtension here: gab.com/hash/DissenterExtension.

Please be mindful that when submitting a post, more is better. Include any and all information related to your query, use photos or videos if necessary and someone will be sure to respond in a timely manner.

Browser: Google ChromeVersion: 0.1.3Download: dissenter.com/download

Copyright © 2019 Gab AI, Inc.
Made in USA

\ No newline at end of file +Access to the tab lasts while the you are on that page, and is revoked when the you navigates away or closes the tab.

Contact

If you have any questions, ideas, bugs or anything else, please post a new gab using the hashtag: #DissenterExtension.

Your question, idea or bug may have already been posted by someone else, please have a look at the most recent posts using hashtag #DissenterExtension here: gab.com/hash/DissenterExtension.

Please be mindful that when submitting a post, more is better. Include any and all information related to your query, use photos or videos if necessary and someone will be sure to respond in a timely manner.

Browser: Google ChromeVersion: 0.1.4Download: dissenter.com/download

Copyright © 2019 Gab AI, Inc.
Made in USA

\ No newline at end of file diff --git a/build/chrome/options/options.js b/build/chrome/options/options.js index 795026f..5159f80 100644 --- a/build/chrome/options/options.js +++ b/build/chrome/options/options.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Options=function(){var n=document.getElementById("twitter-enabled"),t=document.getElementById("reddit-enabled"),E=document.getElementById("youtube-enabled"),_=document.getElementById("window-sidebar-enabled");n.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:TWITTER_BUTTONS_ENABLED,value:e})},t.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:REDDIT_BUTTONS_ENABLED,value:e})},E.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:YOUTUBE_BUTTONS_ENABLED,value:e})},_.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WINDOW_SIDEBAR_UNAVAILABLE_ENABLED,value:e})},this.init=function(){chrome.runtime.sendMessage({action:BACKGROUND_ACTION_GET_KEY,key:STORAGE_KEY_ALL},function(e){if(!e)return!1;n.checked=e[TWITTER_BUTTONS_ENABLED],t.checked=e[REDDIT_BUTTONS_ENABLED],E.checked=e[YOUTUBE_BUTTONS_ENABLED],_.checked=e[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]})}};document.addEventListener("DOMContentLoaded",function(){(new Options).init()}); \ No newline at end of file +var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.4"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Options=function(){var n=document.getElementById("twitter-enabled"),t=document.getElementById("reddit-enabled"),E=document.getElementById("youtube-enabled"),_=document.getElementById("window-sidebar-enabled");n.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:TWITTER_BUTTONS_ENABLED,value:e})},t.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:REDDIT_BUTTONS_ENABLED,value:e})},E.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:YOUTUBE_BUTTONS_ENABLED,value:e})},_.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WINDOW_SIDEBAR_UNAVAILABLE_ENABLED,value:e})},this.init=function(){chrome.runtime.sendMessage({action:BACKGROUND_ACTION_GET_KEY,key:STORAGE_KEY_ALL},function(e){if(!e)return!1;n.checked=e[TWITTER_BUTTONS_ENABLED],t.checked=e[REDDIT_BUTTONS_ENABLED],E.checked=e[YOUTUBE_BUTTONS_ENABLED],_.checked=e[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]})}};document.addEventListener("DOMContentLoaded",function(){(new Options).init()}); \ No newline at end of file diff --git a/build/chrome/popup/popup.js b/build/chrome/popup/popup.js index 3216325..437680f 100644 --- a/build/chrome/popup/popup.js +++ b/build/chrome/popup/popup.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Popup=function(){var t=this,i=document.getElementById("popup-iframe"),r="";t.onPopupOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(r===n)return!1;r=n;var t=encodeURIComponent(n),o=BASE_URI+t;setTimeout(function(){i.setAttribute("src",o),i.classList.remove("hidden")},250)},t.init=function(e){if(e&&isString(e))t.onPopupOpen({url:e});else if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var n=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(n),safari.application.addEventListener("popover",function(e){r!==n.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else chrome.tabs.query({active:!0,currentWindow:!0},function(e){if(!e||!isArray(e))return!1;var n=e[0];t.onPopupOpen(n)})}};if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var popup=new Popup;popup.init()}else document.addEventListener("DOMContentLoaded",function(){var e=getQueryStringValue("url");(new Popup).init(e)}); \ No newline at end of file +var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.4"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Popup=function(){var t=this,i=document.getElementById("popup-iframe"),r="";t.onPopupOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(r===n)return!1;r=n;var t=encodeURIComponent(n),o=BASE_URI+t;setTimeout(function(){i.setAttribute("src",o),i.classList.remove("hidden")},250)},t.init=function(e){if(e&&isString(e))t.onPopupOpen({url:e});else if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var n=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(n),safari.application.addEventListener("popover",function(e){r!==n.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else chrome.tabs.query({active:!0,currentWindow:!0},function(e){if(!e||!isArray(e))return!1;var n=e[0];t.onPopupOpen(n)})}};if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var popup=new Popup;popup.init()}else document.addEventListener("DOMContentLoaded",function(){var e=getQueryStringValue("url");(new Popup).init(e)}); \ No newline at end of file diff --git a/build/edge/background/background.js b/build/edge/background/background.js index bf45cc8..e583a43 100644 --- a/build/edge/background/background.js +++ b/build/edge/background/background.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var t=document;"loading"==t.readyState?t.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}function GDEStorage(){var e=this;function r(){return null!=window.localStorage&&(window.localStorage[STORAGE_BASE]||isObject(window.localStorage[STORAGE_BASE])||(window.localStorage[STORAGE_BASE]=JSON.stringify(STORAGE_DEFAULT_PARAMS)),!0)}e.init=function(){return r(),!0},e.getValue=function(e){r();var t=window.localStorage[STORAGE_BASE];return t=JSON.parse(t),e===STORAGE_KEY_ALL?t:t[e]},e.setValue=function(e,t){r();var n=window.localStorage[STORAGE_BASE];return(n=JSON.parse(n))[e]=t,window.localStorage[STORAGE_BASE]=JSON.stringify(n),!0},e.logout=function(){return null!=window.localStorage&&(e.setValue(STORAGE_KEY_LOGGED_IN,!1),!0)}}browser.browserAction.onClicked.addListener(function(){browser.tabs.create({url:"index.html"})}),browser.runtime.onMessage.addListener(function(e,t,n){var r=e.action||"";if(r===BACKGROUND_ACTION_OPEN_POPUP){var o=e.url||"",_=e.height||0,E=screen.width,i=screen.height-_,A=browser.extension.getURL("popup/popup.html?url="+o),a=gdes.getValue(WINDOW_SIDEBAR_UNAVAILABLE_ENABLED);if(BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&!a)return browser.runtime.sendMessage({url:o}),!0;browser.windows.create({url:A,width:420,height:_,top:i,left:E,type:"popup"})}else if(r===BACKGROUND_ACTION_GET_KEY){if(!(s=e.key||""))return n&&n(null),!0;var S=gdes.getValue(s);n&&n(S)}else if(r===BACKGROUND_ACTION_SET_KEY){var s=e.key||"";S=e.value||"";if(!s)return!0;gdes.setValue(s,S)}return!0});var gdes=new GDEStorage;gdes.init(); \ No newline at end of file +var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.4"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var t=document;"loading"==t.readyState?t.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}function GDEStorage(){var e=this;function r(){return null!=window.localStorage&&(window.localStorage[STORAGE_BASE]||isObject(window.localStorage[STORAGE_BASE])||(window.localStorage[STORAGE_BASE]=JSON.stringify(STORAGE_DEFAULT_PARAMS)),!0)}e.init=function(){return r(),!0},e.getValue=function(e){r();var t=window.localStorage[STORAGE_BASE];return t=JSON.parse(t),e===STORAGE_KEY_ALL?t:t[e]},e.setValue=function(e,t){r();var n=window.localStorage[STORAGE_BASE];return(n=JSON.parse(n))[e]=t,window.localStorage[STORAGE_BASE]=JSON.stringify(n),!0},e.logout=function(){return null!=window.localStorage&&(e.setValue(STORAGE_KEY_LOGGED_IN,!1),!0)}}browser.browserAction.onClicked.addListener(function(){browser.tabs.create({url:"index.html"})}),browser.runtime.onMessage.addListener(function(e,t,n){var r=e.action||"";if(r===BACKGROUND_ACTION_OPEN_POPUP){var o=e.url||"",_=e.height||0,E=screen.width,i=screen.height-_,A=browser.extension.getURL("popup/popup.html?url="+o),a=gdes.getValue(WINDOW_SIDEBAR_UNAVAILABLE_ENABLED);if(BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&!a)return browser.runtime.sendMessage({url:o}),!0;browser.windows.create({url:A,width:420,height:_,top:i,left:E,type:"popup"})}else if(r===BACKGROUND_ACTION_GET_KEY){if(!(s=e.key||""))return n&&n(null),!0;var S=gdes.getValue(s);n&&n(S)}else if(r===BACKGROUND_ACTION_SET_KEY){var s=e.key||"";S=e.value||"";if(!s)return!0;gdes.setValue(s,S)}return!0});var gdes=new GDEStorage;gdes.init(); \ No newline at end of file diff --git a/build/edge/content/all/script/script.js b/build/edge/content/all/script/script.js deleted file mode 100644 index 5317a0c..0000000 --- a/build/edge/content/all/script/script.js +++ /dev/null @@ -1,4 +0,0 @@ -/* Automatically generated file. Do not edit directly. -Copyright (C) 2019 Gab AI, Inc. -All Rights Reserved */ -var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",COLOR_GAB_GREEN="#21cf7b",isObject=function(t){return!isArray(t)&&!isDate(t)&&(null!==t&&"object"==typeof t)},isString=function(t){return"string"==typeof t||t instanceof String},isDate=function(t){return!isString(t)&&!isArray(t)&&null!=t&&null!=t&&(t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t))},isArray=function(t){return Array.isArray(t)};function ready(t){var e=document;"loading"==e.readyState?e.addEventListener("DOMContentLoaded",t):t()}function getQueryStringValue(t){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var GDAll=function(){var t=function(){function t(){var t=document.getElementById("disqus_thread");if(!t)return!1;var e=function(){var t=document.createElement("div");t.style.setProperty("display","block","important"),t.style.setProperty("width","100%","important"),t.style.setProperty("height","80px","important"),t.style.setProperty("padding","20px 0","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("box-sizing","border-box","important");var e=document.createElement("a");return e.textContent="View Comments on Dissenter",e.style.setProperty("display","block","important"),e.style.setProperty("width","100%","important"),e.style.setProperty("height","40px","important"),e.style.setProperty("background-color",COLOR_GAB_GREEN,"important"),e.style.setProperty("color","#fff","important"),e.style.setProperty("border-radius","4px","important"),e.style.setProperty("text-align","center","important"),e.style.setProperty("margin","0 auto","important"),e.style.setProperty("line-height","40px","important"),e.style.setProperty("font-size","14px","important"),e.style.setProperty("box-sizing","border-box","important"),e.style.setProperty("cursor","pointer","important"),t.appendChild(e),t}();return t.parentElement.insertBefore(e,t),e.onclick=r,!0}function r(){var t=window.location.href,e=window.innerHeight;browser.runtime.sendMessage({action:BACKGROUND_ACTION_OPEN_POPUP,url:t,height:e})}this.init=function(){t()}};this.init=function(){(new t).init()}};ready(function(){setTimeout(function(){(new GDAll).init()},5e3)}); \ No newline at end of file diff --git a/build/edge/content/reddit/script/script.js b/build/edge/content/reddit/script/script.js index ee26bf5..4a9e2df 100644 --- a/build/edge/content/reddit/script/script.js +++ b/build/edge/content/reddit/script/script.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(t){return!isArray(t)&&!isDate(t)&&(null!==t&&"object"==typeof t)},isString=function(t){return"string"==typeof t||t instanceof String},isDate=function(t){return!isString(t)&&!isArray(t)&&null!=t&&null!=t&&(t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t))},isArray=function(t){return Array.isArray(t)};function ready(t){var e=document;"loading"==e.readyState?e.addEventListener("DOMContentLoaded",t):t()}function getQueryStringValue(t){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var GDReddit=function(){var s=[];function a(){var t=document.querySelectorAll('a[data-click-id="comments"][data-test-id="comments-page-link-num-comments"]');if(!t)return!1;for(var e=0;e Dissenter Extension - Options

Dissenter Extension — Options

Close this page when you're done
Content Scripts"Content scripts" are scripts that run in specific web pages. By using the standard Document Object Model (DOM), these scripts are able to make changes to those websites in order to enhance the experience.
About Browser Permissions

Active Tab: The "Active Tab" permission gives this extension temporary access to the currently active tab when the you invoke the extension.  -Access to the tab lasts while the you are on that page, and is revoked when the you navigates away or closes the tab.

Contact

If you have any questions, ideas, bugs or anything else, please post a new gab using the hashtag: #DissenterExtension.

Your question, idea or bug may have already been posted by someone else, please have a look at the most recent posts using hashtag #DissenterExtension here: gab.com/hash/DissenterExtension.

Please be mindful that when submitting a post, more is better. Include any and all information related to your query, use photos or videos if necessary and someone will be sure to respond in a timely manner.

Browser: Microsoft EdgeVersion: 0.1.3Download: dissenter.com/download

Copyright © 2019 Gab AI, Inc.
Made in USA

\ No newline at end of file +Access to the tab lasts while the you are on that page, and is revoked when the you navigates away or closes the tab.

Contact

If you have any questions, ideas, bugs or anything else, please post a new gab using the hashtag: #DissenterExtension.

Your question, idea or bug may have already been posted by someone else, please have a look at the most recent posts using hashtag #DissenterExtension here: gab.com/hash/DissenterExtension.

Please be mindful that when submitting a post, more is better. Include any and all information related to your query, use photos or videos if necessary and someone will be sure to respond in a timely manner.

Browser: Microsoft EdgeVersion: 0.1.4Download: dissenter.com/download

Copyright © 2019 Gab AI, Inc.
Made in USA

\ No newline at end of file diff --git a/build/edge/options/options.js b/build/edge/options/options.js index 03c719a..acc8e6c 100644 --- a/build/edge/options/options.js +++ b/build/edge/options/options.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Options=function(){var n=document.getElementById("twitter-enabled"),t=document.getElementById("reddit-enabled"),E=document.getElementById("youtube-enabled"),_=document.getElementById("window-sidebar-enabled");n.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:TWITTER_BUTTONS_ENABLED,value:e})},t.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:REDDIT_BUTTONS_ENABLED,value:e})},E.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:YOUTUBE_BUTTONS_ENABLED,value:e})},_.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WINDOW_SIDEBAR_UNAVAILABLE_ENABLED,value:e})},this.init=function(){browser.runtime.sendMessage({action:BACKGROUND_ACTION_GET_KEY,key:STORAGE_KEY_ALL},function(e){if(!e)return!1;n.checked=e[TWITTER_BUTTONS_ENABLED],t.checked=e[REDDIT_BUTTONS_ENABLED],E.checked=e[YOUTUBE_BUTTONS_ENABLED],_.checked=e[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]})}};document.addEventListener("DOMContentLoaded",function(){(new Options).init()}); \ No newline at end of file +var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.4"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Options=function(){var n=document.getElementById("twitter-enabled"),t=document.getElementById("reddit-enabled"),E=document.getElementById("youtube-enabled"),_=document.getElementById("window-sidebar-enabled");n.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:TWITTER_BUTTONS_ENABLED,value:e})},t.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:REDDIT_BUTTONS_ENABLED,value:e})},E.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:YOUTUBE_BUTTONS_ENABLED,value:e})},_.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WINDOW_SIDEBAR_UNAVAILABLE_ENABLED,value:e})},this.init=function(){browser.runtime.sendMessage({action:BACKGROUND_ACTION_GET_KEY,key:STORAGE_KEY_ALL},function(e){if(!e)return!1;n.checked=e[TWITTER_BUTTONS_ENABLED],t.checked=e[REDDIT_BUTTONS_ENABLED],E.checked=e[YOUTUBE_BUTTONS_ENABLED],_.checked=e[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]})}};document.addEventListener("DOMContentLoaded",function(){(new Options).init()}); \ No newline at end of file diff --git a/build/edge/popup/popup.js b/build/edge/popup/popup.js index a531f6e..8af97c8 100644 --- a/build/edge/popup/popup.js +++ b/build/edge/popup/popup.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Popup=function(){var t=this,r=document.getElementById("popup-iframe"),o="";t.onPopupOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(o===n)return!1;o=n;var t=encodeURIComponent(n),i=BASE_URI+t;setTimeout(function(){r.setAttribute("src",i),r.classList.remove("hidden")},250)},t.init=function(e){if(e&&isString(e))t.onPopupOpen({url:e});else if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var n=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(n),safari.application.addEventListener("popover",function(e){o!==n.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else browser.tabs.query({active:!0,currentWindow:!0},function(e){if(!e||!isArray(e))return!1;var n=e[0];t.onPopupOpen(n)})}};if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var popup=new Popup;popup.init()}else document.addEventListener("DOMContentLoaded",function(){var e=getQueryStringValue("url");(new Popup).init(e)}); \ No newline at end of file +var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.4"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Popup=function(){var t=this,r=document.getElementById("popup-iframe"),o="";t.onPopupOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(o===n)return!1;o=n;var t=encodeURIComponent(n),i=BASE_URI+t;setTimeout(function(){r.setAttribute("src",i),r.classList.remove("hidden")},250)},t.init=function(e){if(e&&isString(e))t.onPopupOpen({url:e});else if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var n=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(n),safari.application.addEventListener("popover",function(e){o!==n.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else browser.tabs.query({active:!0,currentWindow:!0},function(e){if(!e||!isArray(e))return!1;var n=e[0];t.onPopupOpen(n)})}};if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var popup=new Popup;popup.init()}else document.addEventListener("DOMContentLoaded",function(){var e=getQueryStringValue("url");(new Popup).init(e)}); \ No newline at end of file diff --git a/build/firefox/background/background.js b/build/firefox/background/background.js index b2a3cdf..6b13594 100644 --- a/build/firefox/background/background.js +++ b/build/firefox/background/background.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.2"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var t=document;"loading"==t.readyState?t.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}function GDEStorage(){var e=this;function r(){return null!=window.localStorage&&(window.localStorage[STORAGE_BASE]||isObject(window.localStorage[STORAGE_BASE])||(window.localStorage[STORAGE_BASE]=JSON.stringify(STORAGE_DEFAULT_PARAMS)),!0)}e.init=function(){return r(),!0},e.getValue=function(e){r();var t=window.localStorage[STORAGE_BASE];return t=JSON.parse(t),e===STORAGE_KEY_ALL?t:t[e]},e.setValue=function(e,t){r();var n=window.localStorage[STORAGE_BASE];return(n=JSON.parse(n))[e]=t,window.localStorage[STORAGE_BASE]=JSON.stringify(n),!0},e.logout=function(){return null!=window.localStorage&&(e.setValue(STORAGE_KEY_LOGGED_IN,!1),!0)}}browser.browserAction.onClicked.addListener(function(){browser.tabs.create({url:"index.html"})}),browser.runtime.onMessage.addListener(function(e,t,n){var r=e.action||"";if(r===BACKGROUND_ACTION_OPEN_POPUP){var o=e.url||"",_=e.height||0,i=screen.width,E=screen.height-_,A=browser.extension.getURL("popup/popup.html?url="+o),a=gdes.getValue(WINDOW_SIDEBAR_UNAVAILABLE_ENABLED);if(BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&!a)return browser.runtime.sendMessage({url:o}),!0;browser.windows.create({url:A,width:420,height:_,top:E,left:i,type:"popup"})}else if(r===BACKGROUND_ACTION_GET_KEY){if(!(s=e.key||""))return n&&n(null),!0;var S=gdes.getValue(s);n&&n(S)}else if(r===BACKGROUND_ACTION_SET_KEY){var s=e.key||"";S=e.value||"";if(!s)return!0;gdes.setValue(s,S)}return!0});var gdes=new GDEStorage;gdes.init(); \ No newline at end of file +var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var t=document;"loading"==t.readyState?t.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}function GDEStorage(){var e=this;function r(){return null!=window.localStorage&&(window.localStorage[STORAGE_BASE]||isObject(window.localStorage[STORAGE_BASE])||(window.localStorage[STORAGE_BASE]=JSON.stringify(STORAGE_DEFAULT_PARAMS)),!0)}e.init=function(){return r(),!0},e.getValue=function(e){r();var t=window.localStorage[STORAGE_BASE];return t=JSON.parse(t),e===STORAGE_KEY_ALL?t:t[e]},e.setValue=function(e,t){r();var n=window.localStorage[STORAGE_BASE];return(n=JSON.parse(n))[e]=t,window.localStorage[STORAGE_BASE]=JSON.stringify(n),!0},e.logout=function(){return null!=window.localStorage&&(e.setValue(STORAGE_KEY_LOGGED_IN,!1),!0)}}browser.browserAction.onClicked.addListener(function(){browser.tabs.create({url:"index.html"})}),browser.runtime.onMessage.addListener(function(e,t,n){var r=e.action||"";if(r===BACKGROUND_ACTION_OPEN_POPUP){var o=e.url||"",_=e.height||0,i=screen.width,E=screen.height-_,A=browser.extension.getURL("popup/popup.html?url="+o),a=gdes.getValue(WINDOW_SIDEBAR_UNAVAILABLE_ENABLED);if(BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&!a)return browser.runtime.sendMessage({url:o}),!0;browser.windows.create({url:A,width:420,height:_,top:E,left:i,type:"popup"})}else if(r===BACKGROUND_ACTION_GET_KEY){if(!(s=e.key||""))return n&&n(null),!0;var S=gdes.getValue(s);n&&n(S)}else if(r===BACKGROUND_ACTION_SET_KEY){var s=e.key||"";S=e.value||"";if(!s)return!0;gdes.setValue(s,S)}return!0});var gdes=new GDEStorage;gdes.init(); \ No newline at end of file diff --git a/build/firefox/content/all/script/script.js b/build/firefox/content/all/script/script.js deleted file mode 100644 index 276d599..0000000 --- a/build/firefox/content/all/script/script.js +++ /dev/null @@ -1,4 +0,0 @@ -/* Automatically generated file. Do not edit directly. -Copyright (C) 2019 Gab AI, Inc. -All Rights Reserved */ -var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.2"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",COLOR_GAB_GREEN="#21cf7b",isObject=function(t){return!isArray(t)&&!isDate(t)&&(null!==t&&"object"==typeof t)},isString=function(t){return"string"==typeof t||t instanceof String},isDate=function(t){return!isString(t)&&!isArray(t)&&null!=t&&null!=t&&(t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t))},isArray=function(t){return Array.isArray(t)};function ready(t){var e=document;"loading"==e.readyState?e.addEventListener("DOMContentLoaded",t):t()}function getQueryStringValue(t){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var GDAll=function(){var t=function(){function t(){var t=document.getElementById("disqus_thread");if(!t)return!1;var e=function(){var t=document.createElement("div");t.style.setProperty("display","block","important"),t.style.setProperty("width","100%","important"),t.style.setProperty("height","80px","important"),t.style.setProperty("padding","20px 0","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("box-sizing","border-box","important");var e=document.createElement("a");return e.textContent="View Comments on Dissenter",e.style.setProperty("display","block","important"),e.style.setProperty("width","100%","important"),e.style.setProperty("height","40px","important"),e.style.setProperty("background-color",COLOR_GAB_GREEN,"important"),e.style.setProperty("color","#fff","important"),e.style.setProperty("border-radius","4px","important"),e.style.setProperty("text-align","center","important"),e.style.setProperty("margin","0 auto","important"),e.style.setProperty("line-height","40px","important"),e.style.setProperty("font-size","14px","important"),e.style.setProperty("box-sizing","border-box","important"),e.style.setProperty("cursor","pointer","important"),t.appendChild(e),t}();return t.parentElement.insertBefore(e,t),e.onclick=r,!0}function r(){var t=window.location.href,e=window.innerHeight;browser.runtime.sendMessage({action:BACKGROUND_ACTION_OPEN_POPUP,url:t,height:e})}this.init=function(){t()}};this.init=function(){(new t).init()}};ready(function(){setTimeout(function(){(new GDAll).init()},5e3)}); \ No newline at end of file diff --git a/build/firefox/content/reddit/script/script.js b/build/firefox/content/reddit/script/script.js index 65e4690..a70b6b6 100644 --- a/build/firefox/content/reddit/script/script.js +++ b/build/firefox/content/reddit/script/script.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.2"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(t){return!isArray(t)&&!isDate(t)&&(null!==t&&"object"==typeof t)},isString=function(t){return"string"==typeof t||t instanceof String},isDate=function(t){return!isString(t)&&!isArray(t)&&null!=t&&null!=t&&(t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t))},isArray=function(t){return Array.isArray(t)};function ready(t){var e=document;"loading"==e.readyState?e.addEventListener("DOMContentLoaded",t):t()}function getQueryStringValue(t){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var GDReddit=function(){var a=[];function s(){var t=document.querySelectorAll('a[data-click-id="comments"][data-test-id="comments-page-link-num-comments"]');if(!t)return!1;for(var e=0;e Dissenter Extension - Options

Dissenter Extension — Options

Close this page when you're done
Content Scripts"Content scripts" are scripts that run in specific web pages. By using the standard Document Object Model (DOM), these scripts are able to make changes to those websites in order to enhance the experience.
About Browser Permissions

Active Tab: The "Active Tab" permission gives this extension temporary access to the currently active tab when the you invoke the extension.  -Access to the tab lasts while the you are on that page, and is revoked when the you navigates away or closes the tab.

Contact

If you have any questions, ideas, bugs or anything else, please post a new gab using the hashtag: #DissenterExtension.

Your question, idea or bug may have already been posted by someone else, please have a look at the most recent posts using hashtag #DissenterExtension here: gab.com/hash/DissenterExtension.

Please be mindful that when submitting a post, more is better. Include any and all information related to your query, use photos or videos if necessary and someone will be sure to respond in a timely manner.

Browser: Mozilla FirefoxVersion: 0.1.2Download: dissenter.com/download

Copyright © 2019 Gab AI, Inc.
Made in USA

\ No newline at end of file +Access to the tab lasts while the you are on that page, and is revoked when the you navigates away or closes the tab.

Contact

If you have any questions, ideas, bugs or anything else, please post a new gab using the hashtag: #DissenterExtension.

Your question, idea or bug may have already been posted by someone else, please have a look at the most recent posts using hashtag #DissenterExtension here: gab.com/hash/DissenterExtension.

Please be mindful that when submitting a post, more is better. Include any and all information related to your query, use photos or videos if necessary and someone will be sure to respond in a timely manner.

Browser: Mozilla FirefoxVersion: 0.1.3Download: dissenter.com/download

Copyright © 2019 Gab AI, Inc.
Made in USA

\ No newline at end of file diff --git a/build/firefox/options/options.js b/build/firefox/options/options.js index e68940a..9b246cc 100644 --- a/build/firefox/options/options.js +++ b/build/firefox/options/options.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.2"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Options=function(){var n=document.getElementById("twitter-enabled"),t=document.getElementById("reddit-enabled"),E=document.getElementById("youtube-enabled"),_=document.getElementById("window-sidebar-enabled");n.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:TWITTER_BUTTONS_ENABLED,value:e})},t.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:REDDIT_BUTTONS_ENABLED,value:e})},E.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:YOUTUBE_BUTTONS_ENABLED,value:e})},_.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WINDOW_SIDEBAR_UNAVAILABLE_ENABLED,value:e})},this.init=function(){browser.runtime.sendMessage({action:BACKGROUND_ACTION_GET_KEY,key:STORAGE_KEY_ALL},function(e){if(!e)return!1;n.checked=e[TWITTER_BUTTONS_ENABLED],t.checked=e[REDDIT_BUTTONS_ENABLED],E.checked=e[YOUTUBE_BUTTONS_ENABLED],_.checked=e[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]})}};document.addEventListener("DOMContentLoaded",function(){(new Options).init()}); \ No newline at end of file +var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Options=function(){var n=document.getElementById("twitter-enabled"),t=document.getElementById("reddit-enabled"),E=document.getElementById("youtube-enabled"),_=document.getElementById("window-sidebar-enabled");n.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:TWITTER_BUTTONS_ENABLED,value:e})},t.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:REDDIT_BUTTONS_ENABLED,value:e})},E.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:YOUTUBE_BUTTONS_ENABLED,value:e})},_.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WINDOW_SIDEBAR_UNAVAILABLE_ENABLED,value:e})},this.init=function(){browser.runtime.sendMessage({action:BACKGROUND_ACTION_GET_KEY,key:STORAGE_KEY_ALL},function(e){if(!e)return!1;n.checked=e[TWITTER_BUTTONS_ENABLED],t.checked=e[REDDIT_BUTTONS_ENABLED],E.checked=e[YOUTUBE_BUTTONS_ENABLED],_.checked=e[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]})}};document.addEventListener("DOMContentLoaded",function(){(new Options).init()}); \ No newline at end of file diff --git a/build/firefox/popup/popup.js b/build/firefox/popup/popup.js index c96f0b4..937931e 100644 --- a/build/firefox/popup/popup.js +++ b/build/firefox/popup/popup.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.2"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Popup=function(){var t=this,r=document.getElementById("popup-iframe"),o="";t.onPopupOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(o===n)return!1;o=n;var t=encodeURIComponent(n),i=BASE_URI+t;setTimeout(function(){r.setAttribute("src",i),r.classList.remove("hidden")},250)},t.init=function(e){if(e&&isString(e))t.onPopupOpen({url:e});else if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var n=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(n),safari.application.addEventListener("popover",function(e){o!==n.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else browser.tabs.query({active:!0,currentWindow:!0},function(e){if(!e||!isArray(e))return!1;var n=e[0];t.onPopupOpen(n)})}};if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var popup=new Popup;popup.init()}else document.addEventListener("DOMContentLoaded",function(){var e=getQueryStringValue("url");(new Popup).init(e)}); \ No newline at end of file +var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Popup=function(){var t=this,r=document.getElementById("popup-iframe"),o="";t.onPopupOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(o===n)return!1;o=n;var t=encodeURIComponent(n),i=BASE_URI+t;setTimeout(function(){r.setAttribute("src",i),r.classList.remove("hidden")},250)},t.init=function(e){if(e&&isString(e))t.onPopupOpen({url:e});else if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var n=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(n),safari.application.addEventListener("popover",function(e){o!==n.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else browser.tabs.query({active:!0,currentWindow:!0},function(e){if(!e||!isArray(e))return!1;var n=e[0];t.onPopupOpen(n)})}};if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var popup=new Popup;popup.init()}else document.addEventListener("DOMContentLoaded",function(){var e=getQueryStringValue("url");(new Popup).init(e)}); \ No newline at end of file diff --git a/build/firefox/sidebar/sidebar.js b/build/firefox/sidebar/sidebar.js index 09798f2..3cd6ed3 100644 --- a/build/firefox/sidebar/sidebar.js +++ b/build/firefox/sidebar/sidebar.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.2"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var timeout=null,delay=2e3,Sidebar=function(){var r=this,o=document.getElementById("sidebar-iframe"),a="";r.onSidebarOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(a===n)return r.toggleLoading(!1),!1;var t=encodeURIComponent(a=n),i=BASE_URI+t;o.setAttribute("src",i),setTimeout(function(){r.toggleLoading(!1)},500)},r.init=function(e){e&&isString(e)?r.onSidebarOpen({url:e}):BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&browser.tabs.query({active:!0,currentWindow:!0},function(e){if(!e)return!1;var n=e[0];r.onSidebarOpen(n)})},r.toggleLoading=function(e){o.classList.toggle("hidden",e)}},sidebar=null;function handleReload(){sidebar||(sidebar=new Sidebar),sidebar.toggleLoading(!0),null!==timeout&&clearTimeout(timeout),timeout=setTimeout(function(){sidebar.init()},delay)}document.addEventListener("DOMContentLoaded",function(){(sidebar=new Sidebar).init()}),browser.tabs.onActivated.addListener(handleReload),browser.tabs.onUpdated.addListener(handleReload),browser.runtime.onMessage.addListener(function(e){if(!isObject(e))return!1;var n=e.url||"";return!!isString(n)&&(!(n.length<=1)&&(sidebar.toggleLoading(!0),void sidebar.init(n)))}); \ No newline at end of file +var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var timeout=null,delay=2e3,Sidebar=function(){var r=this,o=document.getElementById("sidebar-iframe"),a="";r.onSidebarOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(a===n)return r.toggleLoading(!1),!1;var t=encodeURIComponent(a=n),i=BASE_URI+t;o.setAttribute("src",i),setTimeout(function(){r.toggleLoading(!1)},500)},r.init=function(e){e&&isString(e)?r.onSidebarOpen({url:e}):BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&browser.tabs.query({active:!0,currentWindow:!0},function(e){if(!e)return!1;var n=e[0];r.onSidebarOpen(n)})},r.toggleLoading=function(e){o.classList.toggle("hidden",e)}},sidebar=null;function handleReload(){sidebar||(sidebar=new Sidebar),sidebar.toggleLoading(!0),null!==timeout&&clearTimeout(timeout),timeout=setTimeout(function(){sidebar.init()},delay)}document.addEventListener("DOMContentLoaded",function(){(sidebar=new Sidebar).init()}),browser.tabs.onActivated.addListener(handleReload),browser.tabs.onUpdated.addListener(handleReload),browser.runtime.onMessage.addListener(function(e){if(!isObject(e))return!1;var n=e.url||"";return!!isString(n)&&(!(n.length<=1)&&(sidebar.toggleLoading(!0),void sidebar.init(n)))}); \ No newline at end of file diff --git a/build/safari/dissenter.safariextension/Info.plist b/build/safari/dissenter.safariextension/Info.plist index c0327a1..45c8bc4 100644 --- a/build/safari/dissenter.safariextension/Info.plist +++ b/build/safari/dissenter.safariextension/Info.plist @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleShortVersionString - 0.1.2 + 0.1.3 CFBundleVersion 1 Chrome diff --git a/build/safari/dissenter.safariextension/popup/popup.js b/build/safari/dissenter.safariextension/popup/popup.js index 4e3b563..07e27b3 100644 --- a/build/safari/dissenter.safariextension/popup/popup.js +++ b/build/safari/dissenter.safariextension/popup/popup.js @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -var BROWSER_CONFIG={name:"Apple Safari",slug:"safari",version:"0.1.2"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Popup=function(){var t=this,r=document.getElementById("popup-iframe"),o="";t.onPopupOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(o===n)return!1;o=n;var t=encodeURIComponent(n),i=BASE_URI+t;setTimeout(function(){r.setAttribute("src",i),r.classList.remove("hidden")},250)},t.init=function(e){if(e&&isString(e))t.onPopupOpen({url:e});else if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var n=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(n),safari.application.addEventListener("popover",function(e){o!==n.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else browser.tabs.query({active:!0,currentWindow:!0},function(e){if(!e||!isArray(e))return!1;var n=e[0];t.onPopupOpen(n)})}};if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var popup=new Popup;popup.init()}else document.addEventListener("DOMContentLoaded",function(){var e=getQueryStringValue("url");(new Popup).init(e)}); \ No newline at end of file +var BROWSER_CONFIG={name:"Apple Safari",slug:"safari",version:"0.1.3"},BROWSER_CHROME_SLUG="chrome",BROWSER_FIREFOX_SLUG="firefox",BROWSER_EDGE_SLUG="edge",BROWSER_SAFARI_SLUG="safari",BASE_URI="https://dissenter.com/discussion/begin-extension?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",COLOR_GAB_GREEN="#21cf7b",STORAGE_BASE="gab_dissenter_extension_data",TWITTER_BUTTONS_ENABLED="twitter_buttons_enabled",REDDIT_BUTTONS_ENABLED="reddit_buttons_enabled",YOUTUBE_BUTTONS_ENABLED="youtube_buttons_enabled",WINDOW_SIDEBAR_UNAVAILABLE_ENABLED="window_sidebar_unavailable_enabled",STORAGE_DEFAULT_PARAMS={};STORAGE_DEFAULT_PARAMS[TWITTER_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[REDDIT_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[YOUTUBE_BUTTONS_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED]=!0;var STORAGE_KEY_ALL="all",isObject=function(e){return!isArray(e)&&!isDate(e)&&(null!==e&&"object"==typeof e)},isString=function(e){return"string"==typeof e||e instanceof String},isDate=function(e){return!isString(e)&&!isArray(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},isArray=function(e){return Array.isArray(e)};function ready(e){var n=document;"loading"==n.readyState?n.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}var Popup=function(){var t=this,r=document.getElementById("popup-iframe"),o="";t.onPopupOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(o===n)return!1;o=n;var t=encodeURIComponent(n),i=BASE_URI+t;setTimeout(function(){r.setAttribute("src",i),r.classList.remove("hidden")},250)},t.init=function(e){if(e&&isString(e))t.onPopupOpen({url:e});else if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var n=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(n),safari.application.addEventListener("popover",function(e){o!==n.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else browser.tabs.query({active:!0,currentWindow:!0},function(e){if(!e||!isArray(e))return!1;var n=e[0];t.onPopupOpen(n)})}};if(BROWSER_CONFIG.slug===BROWSER_SAFARI_SLUG){var popup=new Popup;popup.init()}else document.addEventListener("DOMContentLoaded",function(){var e=getQueryStringValue("url");(new Popup).init(e)}); \ No newline at end of file