diff --git a/build/chrome/assets/images/icons/gab-icon.svg b/build/chrome/assets/images/icons/gab-icon.svg new file mode 100644 index 0000000..e1665c2 --- /dev/null +++ b/build/chrome/assets/images/icons/gab-icon.svg @@ -0,0 +1 @@ + diff --git a/build/chrome/background/background.js b/build/chrome/background/background.js index 97a83da..b95f8bc 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.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 +var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.5"},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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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 setExtensionIconBadge(e){e||(e=""),e=formatBadgeText(e=String(e)),chrome.browserAction.setBadgeBackgroundColor({color:"#f40e1c"}),chrome.browserAction.setBadgeText({text:e}),BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&chrome.browserAction.setBadgeTextColor({color:"#ffffff"})}function formatBadgeText(e){if(!e)return"";var t=parseInt(e);if(t<1)return"";var n="";if(t<1e3)return String(t);if(1e3<=t&&t<1e4){var r=truncateNumber(t,2);n=(r/=10)+"k"}else if(1e4<=t&&t<1e5){n=(r=truncateNumber(t,2))+"k"}else if(1e5<=t&&t<1e6){n=(r=truncateNumber(t,3))+"k"}else 1e6<=t&&(n="1M+");return n}function truncateNumber(e,t){return e?e.toString().substring(0,t):0}function performRequest(e,t){if(!e||!isObject(e))return t(!1,{});var n=e.method||"",r=e.url||"",o=e.params,i=e.headers;if(!n||!r)return!!t&&t(!1,{});var a=new XMLHttpRequest;if(a.open(n,r,!0),a.setRequestHeader("Content-type","application/json"),i&&isArray(i))for(var _=0;_ 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.4Download: dissenter.com/download

Copyright © 2019 Gab AI, Inc.
Made in USA

\ No newline at end of file +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.5Download: 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 5159f80..e16b3aa 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.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 +var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.5"},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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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"),E=document.getElementById("reddit-enabled"),_=document.getElementById("youtube-enabled"),t=document.getElementById("window-sidebar-enabled"),A=document.getElementById("comment-badge-enabled"),T=document.getElementById("disqus-dissent-enabled");n.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:TWITTER_BUTTONS_ENABLED,value:e})},E.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:REDDIT_BUTTONS_ENABLED,value:e})},_.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:YOUTUBE_BUTTONS_ENABLED,value:e})},t.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WINDOW_SIDEBAR_UNAVAILABLE_ENABLED,value:e})},A.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WEBSITE_COMMENT_BADGE_ENABLED,value:e})},T.onchange=function(){var e=this.checked;chrome.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:DISSENT_DISQUS_BUTTONS_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],E.checked=e[REDDIT_BUTTONS_ENABLED],_.checked=e[YOUTUBE_BUTTONS_ENABLED],t.checked=e[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED],A.checked=e[WEBSITE_COMMENT_BADGE_ENABLED],T.checked=e[DISSENT_DISQUS_BUTTONS_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 437680f..697913d 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.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 +var BROWSER_CONFIG={name:"Google Chrome",slug:"chrome",version:"0.1.5"},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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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,o=document.getElementById("popup-iframe"),i="";t.onPopupOpen=function(e){if(!isObject(e))return!1;var n=e.url||"";if(i===n)return!1;i=n;var t=encodeURIComponent(n),_=BASE_URI+t;setTimeout(function(){o.setAttribute("src",_),o.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){i!==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/assets/images/icons/gab-icon.svg b/build/edge/assets/images/icons/gab-icon.svg new file mode 100644 index 0000000..e1665c2 --- /dev/null +++ b/build/edge/assets/images/icons/gab-icon.svg @@ -0,0 +1 @@ + diff --git a/build/edge/background/background.js b/build/edge/background/background.js index e583a43..278cbf7 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.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 +var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.5"},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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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 setExtensionIconBadge(e){e||(e=""),e=formatBadgeText(e=String(e)),browser.browserAction.setBadgeBackgroundColor({color:"#f40e1c"}),browser.browserAction.setBadgeText({text:e}),BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&browser.browserAction.setBadgeTextColor({color:"#ffffff"})}function formatBadgeText(e){if(!e)return"";var t=parseInt(e);if(t<1)return"";var n="";if(t<1e3)return String(t);if(1e3<=t&&t<1e4){var r=truncateNumber(t,2);n=(r/=10)+"k"}else if(1e4<=t&&t<1e5){n=(r=truncateNumber(t,2))+"k"}else if(1e5<=t&&t<1e6){n=(r=truncateNumber(t,3))+"k"}else 1e6<=t&&(n="1M+");return n}function truncateNumber(e,t){return e?e.toString().substring(0,t):0}function performRequest(e,t){if(!e||!isObject(e))return t(!1,{});var n=e.method||"",r=e.url||"",o=e.params,i=e.headers;if(!n||!r)return!!t&&t(!1,{});var s=new XMLHttpRequest;if(s.open(n,r,!0),s.setRequestHeader("Content-type","application/json"),i&&isArray(i))for(var a=0;a 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.4Download: dissenter.com/download

Copyright © 2019 Gab AI, Inc.
Made in USA

\ No newline at end of file +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.5Download: 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 acc8e6c..97b962d 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.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 +var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.5"},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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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"),E=document.getElementById("reddit-enabled"),_=document.getElementById("youtube-enabled"),t=document.getElementById("window-sidebar-enabled"),A=document.getElementById("comment-badge-enabled"),T=document.getElementById("disqus-dissent-enabled");n.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:TWITTER_BUTTONS_ENABLED,value:e})},E.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:REDDIT_BUTTONS_ENABLED,value:e})},_.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:YOUTUBE_BUTTONS_ENABLED,value:e})},t.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WINDOW_SIDEBAR_UNAVAILABLE_ENABLED,value:e})},A.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WEBSITE_COMMENT_BADGE_ENABLED,value:e})},T.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:DISSENT_DISQUS_BUTTONS_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],E.checked=e[REDDIT_BUTTONS_ENABLED],_.checked=e[YOUTUBE_BUTTONS_ENABLED],t.checked=e[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED],A.checked=e[WEBSITE_COMMENT_BADGE_ENABLED],T.checked=e[DISSENT_DISQUS_BUTTONS_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 8af97c8..e7290cb 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.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 +var BROWSER_CONFIG={name:"Microsoft Edge",slug:"edge",version:"0.1.5"},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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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"),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),_=BASE_URI+t;setTimeout(function(){i.setAttribute("src",_),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){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/assets/images/icons/gab-icon.svg b/build/firefox/assets/images/icons/gab-icon.svg new file mode 100644 index 0000000..e1665c2 --- /dev/null +++ b/build/firefox/assets/images/icons/gab-icon.svg @@ -0,0 +1 @@ + diff --git a/build/firefox/background/background.js b/build/firefox/background/background.js index 6b13594..cbb7747 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.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 +var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.5"},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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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 setExtensionIconBadge(e){e||(e=""),e=formatBadgeText(e=String(e)),browser.browserAction.setBadgeBackgroundColor({color:"#f40e1c"}),browser.browserAction.setBadgeText({text:e}),BROWSER_CONFIG.slug===BROWSER_FIREFOX_SLUG&&browser.browserAction.setBadgeTextColor({color:"#ffffff"})}function formatBadgeText(e){if(!e)return"";var t=parseInt(e);if(t<1)return"";var r="";if(t<1e3)return String(t);if(1e3<=t&&t<1e4){var n=truncateNumber(t,2);r=(n/=10)+"k"}else if(1e4<=t&&t<1e5){r=(n=truncateNumber(t,2))+"k"}else if(1e5<=t&&t<1e6){r=(n=truncateNumber(t,3))+"k"}else 1e6<=t&&(r="1M+");return r}function truncateNumber(e,t){return e?e.toString().substring(0,t):0}function performRequest(e,t){if(!e||!isObject(e))return t(!1,{});var r=e.method||"",n=e.url||"",o=e.params,i=e.headers;if(!r||!n)return!!t&&t(!1,{});var a=new XMLHttpRequest;if(a.open(r,n,!0),a.setRequestHeader("Content-type","application/json"),i&&isArray(i))for(var s=0;s 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.3Download: dissenter.com/download

Copyright © 2019 Gab AI, Inc.
Made in USA

\ No newline at end of file +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.5Download: 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 9b246cc..eefe54e 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.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:"Mozilla Firefox",slug:"firefox",version:"0.1.5"},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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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"),E=document.getElementById("reddit-enabled"),_=document.getElementById("youtube-enabled"),t=document.getElementById("window-sidebar-enabled"),A=document.getElementById("comment-badge-enabled"),T=document.getElementById("disqus-dissent-enabled");n.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:TWITTER_BUTTONS_ENABLED,value:e})},E.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:REDDIT_BUTTONS_ENABLED,value:e})},_.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:YOUTUBE_BUTTONS_ENABLED,value:e})},t.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WINDOW_SIDEBAR_UNAVAILABLE_ENABLED,value:e})},A.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:WEBSITE_COMMENT_BADGE_ENABLED,value:e})},T.onchange=function(){var e=this.checked;browser.runtime.sendMessage({action:BACKGROUND_ACTION_SET_KEY,key:DISSENT_DISQUS_BUTTONS_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],E.checked=e[REDDIT_BUTTONS_ENABLED],_.checked=e[YOUTUBE_BUTTONS_ENABLED],t.checked=e[WINDOW_SIDEBAR_UNAVAILABLE_ENABLED],A.checked=e[WEBSITE_COMMENT_BADGE_ENABLED],T.checked=e[DISSENT_DISQUS_BUTTONS_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 937931e..4d56e03 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.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:"Mozilla Firefox",slug:"firefox",version:"0.1.5"},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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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"),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),_=BASE_URI+t;setTimeout(function(){i.setAttribute("src",_),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){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 3cd6ed3..e800ce2 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.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 +var BROWSER_CONFIG={name:"Mozilla Firefox",slug:"firefox",version:"0.1.5"},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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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"))}var timeout=null,delay=2e3,Sidebar=function(){var r=this,_=document.getElementById("sidebar-iframe"),o="";r.onSidebarOpen=function(e){if(!isObject(e))return!1;var t=e.url||"";if(o===t)return r.toggleLoading(!1),!1;var n=encodeURIComponent(o=t),i=BASE_URI+n;_.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 t=e[0];r.onSidebarOpen(t)})},r.toggleLoading=function(e){_.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 t=e.url||"";return!!isString(t)&&(!(t.length<=1)&&(sidebar.toggleLoading(!0),void sidebar.init(t)))}); \ No newline at end of file diff --git a/build/safari/dissenter.safariextension/Info.plist b/build/safari/dissenter.safariextension/Info.plist index 45c8bc4..670b5a9 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.3 + 0.1.4 CFBundleVersion 1 Chrome diff --git a/build/safari/dissenter.safariextension/assets/images/icons/gab-icon.svg b/build/safari/dissenter.safariextension/assets/images/icons/gab-icon.svg new file mode 100644 index 0000000..e1665c2 --- /dev/null +++ b/build/safari/dissenter.safariextension/assets/images/icons/gab-icon.svg @@ -0,0 +1 @@ + diff --git a/build/safari/dissenter.safariextension/popup/popup.js b/build/safari/dissenter.safariextension/popup/popup.js index 07e27b3..4ed0e77 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.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:"Apple Safari",slug:"safari",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=",COMMENT_COUNT_URI="https://dissenter.com/notification/comment-count?url=",BACKGROUND_ACTION_OPEN_POPUP="open_popup",BACKGROUND_ACTION_GET_KEY="get_key",BACKGROUND_ACTION_SET_KEY="set_key",BACKGROUND_ACTION_SET_BADGE="set_badge",BACKGROUND_ACTION_TAB_UPDATED="tab_updated",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",WEBSITE_COMMENT_BADGE_ENABLED="website_comment_badge_enabled",DISSENT_DISQUS_BUTTONS_ENABLED="dissent_disqus_buttons_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,STORAGE_DEFAULT_PARAMS[WEBSITE_COMMENT_BADGE_ENABLED]=!0,STORAGE_DEFAULT_PARAMS[DISSENT_DISQUS_BUTTONS_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"),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),_=BASE_URI+t;setTimeout(function(){i.setAttribute("src",_),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){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