diff --git a/build/chrome/background/background.js b/build/chrome/background/background.js index 65166ef..e9ae27b 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 e={name:"Google Chrome",slug:"chrome",version:"0.1.2"},n="chrome",r="firefox",t="edge",o="safari",i="https://dissenter.com/discussion/begin-extension?url=",c=function(e){return!l(e)&&!u(e)&&(null!==e&&"object"==typeof e)},s=function(e){return"string"==typeof e||e instanceof String},u=function(e){return!s(e)&&!l(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},l=function(e){return Array.isArray(e)};chrome.browserAction.onClicked.addListener(function(){chrome.tabs.create({url:"index.html"})}); \ No newline at end of file +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(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"))}chrome.browserAction.onClicked.addListener(function(){chrome.tabs.create({url:"index.html"})}),chrome.runtime.onMessage.addListener(function(e,n,t){if((e.action||"")===BACKGROUND_ACTION_OPEN_POPUP){var r=e.url||"",o=e.height||0,i=screen.width,c=screen.height-o,a=chrome.extension.getURL("popup/popup.html?url="+r);chrome.windows.create({url:a,width:420,height:o,top:c,left:i,type:"popup"})}return!0}); \ No newline at end of file diff --git a/build/chrome/content/all/script/script.js b/build/chrome/content/all/script/script.js new file mode 100644 index 0000000..e9de73c --- /dev/null +++ b/build/chrome/content/all/script/script.js @@ -0,0 +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",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 new file mode 100644 index 0000000..acefedf --- /dev/null +++ b/build/chrome/content/reddit/script/script.js @@ -0,0 +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",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 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 \ No newline at end of file +Dissenter \ No newline at end of file diff --git a/build/chrome/popup/popup.js b/build/chrome/popup/popup.js index cfd6d4c..d9f507a 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 n={name:"Google Chrome",slug:"chrome",version:"0.1.2"},e="chrome",t="firefox",o="edge",a="safari",u="https://dissenter.com/discussion/begin-extension?url=",c=function(n){return!s(n)&&!r(n)&&(null!==n&&"object"==typeof n)},i=function(n){return"string"==typeof n||n instanceof String},r=function(n){return!i(n)&&!s(n)&&null!=n&&null!=n&&(n&&"[object Date]"===Object.prototype.toString.call(n)&&!isNaN(n))},s=function(n){return Array.isArray(n)},f=function(){var t=this,i=document.getElementById("popup-iframe"),r="";t.onPopupOpen=function(n){if(!c(n))return!1;n.title;var e=n.url||"";if(r===e)return!1;r=e;var t=encodeURIComponent(e),o=u+t;setTimeout(function(){i.setAttribute("src",o),i.classList.remove("hidden")},250)},t.init=function(){if(n.slug===a){var e=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(e),safari.application.addEventListener("popover",function(n){r!==e.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else chrome.tabs.query({active:!0,currentWindow:!0},function(n){if(!n||!s(n))return!1;var e=n[0];t.onPopupOpen(e)})}};if(n.slug===a){var p=new f;p.init()}else document.addEventListener("DOMContentLoaded",function(){(new f).init()}); \ No newline at end of file +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(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"),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),o=BASE_URI+t;setTimeout(function(){r.setAttribute("src",o),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){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/background/background.js b/build/edge/background/background.js index 926631a..ec98055 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 e={name:"Microsoft Edge",slug:"edge",version:"0.1.2"},n="chrome",r="firefox",t="edge",o="safari",i="https://dissenter.com/discussion/begin-extension?url=",s=function(e){return!a(e)&&!u(e)&&(null!==e&&"object"==typeof e)},c=function(e){return"string"==typeof e||e instanceof String},u=function(e){return!c(e)&&!a(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},a=function(e){return Array.isArray(e)};browser.browserAction.onClicked.addListener(function(){browser.tabs.create({url:"index.html"})}); \ No newline at end of file +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(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 r=document;"loading"==r.readyState?r.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}browser.browserAction.onClicked.addListener(function(){browser.tabs.create({url:"index.html"})}),browser.runtime.onMessage.addListener(function(e,r,t){if((e.action||"")===BACKGROUND_ACTION_OPEN_POPUP){var n=e.url||"",o=e.height||0,i=screen.width,s=screen.height-o,a=browser.extension.getURL("popup/popup.html?url="+n);browser.windows.create({url:a,width:420,height:o,top:s,left:i,type:"popup"})}return!0}); \ No newline at end of file diff --git a/build/edge/content/all/script/script.js b/build/edge/content/all/script/script.js new file mode 100644 index 0000000..5317a0c --- /dev/null +++ b/build/edge/content/all/script/script.js @@ -0,0 +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",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 new file mode 100644 index 0000000..ca4f306 --- /dev/null +++ b/build/edge/content/reddit/script/script.js @@ -0,0 +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",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 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 \ No newline at end of file +Dissenter \ No newline at end of file diff --git a/build/edge/popup/popup.js b/build/edge/popup/popup.js index 051c09d..172962a 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 n={name:"Microsoft Edge",slug:"edge",version:"0.1.2"},e="chrome",t="firefox",i="edge",a="safari",u="https://dissenter.com/discussion/begin-extension?url=",s=function(n){return!c(n)&&!r(n)&&(null!==n&&"object"==typeof n)},o=function(n){return"string"==typeof n||n instanceof String},r=function(n){return!o(n)&&!c(n)&&null!=n&&null!=n&&(n&&"[object Date]"===Object.prototype.toString.call(n)&&!isNaN(n))},c=function(n){return Array.isArray(n)},f=function(){var t=this,o=document.getElementById("popup-iframe"),r="";t.onPopupOpen=function(n){if(!s(n))return!1;n.title;var e=n.url||"";if(r===e)return!1;r=e;var t=encodeURIComponent(e),i=u+t;setTimeout(function(){o.setAttribute("src",i),o.classList.remove("hidden")},250)},t.init=function(){if(n.slug===a){var e=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(e),safari.application.addEventListener("popover",function(n){r!==e.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else browser.tabs.query({active:!0,currentWindow:!0},function(n){if(!n||!c(n))return!1;var e=n[0];t.onPopupOpen(e)})}};if(n.slug===a){var p=new f;p.init()}else document.addEventListener("DOMContentLoaded",function(){(new f).init()}); \ No newline at end of file +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(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),r=BASE_URI+t;setTimeout(function(){i.setAttribute("src",r),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/background/background.js b/build/firefox/background/background.js index cd20479..ed35053 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 e={name:"Mozilla Firefox",slug:"firefox",version:"0.1.1"},r="chrome",n="firefox",t="edge",o="safari",i="https://dissenter.com/discussion/begin-extension?url=",s=function(e){return!l(e)&&!u(e)&&(null!==e&&"object"==typeof e)},c=function(e){return"string"==typeof e||e instanceof String},u=function(e){return!c(e)&&!l(e)&&null!=e&&null!=e&&(e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e))},l=function(e){return Array.isArray(e)};browser.browserAction.onClicked.addListener(function(){browser.tabs.create({url:"index.html"})}); \ No newline at end of file +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(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 r=document;"loading"==r.readyState?r.addEventListener("DOMContentLoaded",e):e()}function getQueryStringValue(e){return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(e).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))}browser.browserAction.onClicked.addListener(function(){browser.tabs.create({url:"index.html"})}),browser.runtime.onMessage.addListener(function(e,r,n){if((e.action||"")===BACKGROUND_ACTION_OPEN_POPUP){var t=e.url||"",i=e.height||0,o=screen.width,s=screen.height-i,a=browser.extension.getURL("popup/popup.html?url="+t);browser.windows.create({url:a,width:420,height:i,top:s,left:o,type:"popup"})}return!0}); \ No newline at end of file diff --git a/build/firefox/content/all/script/script.js b/build/firefox/content/all/script/script.js new file mode 100644 index 0000000..276d599 --- /dev/null +++ b/build/firefox/content/all/script/script.js @@ -0,0 +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",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 new file mode 100644 index 0000000..199feb1 --- /dev/null +++ b/build/firefox/content/reddit/script/script.js @@ -0,0 +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",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 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 \ No newline at end of file +Dissenter \ No newline at end of file diff --git a/build/firefox/popup/popup.js b/build/firefox/popup/popup.js index a1b9867..4ea6642 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 n={name:"Mozilla Firefox",slug:"firefox",version:"0.1.1"},e="chrome",t="firefox",i="edge",a="safari",u="https://dissenter.com/discussion/begin-extension?url=",s=function(n){return!c(n)&&!r(n)&&(null!==n&&"object"==typeof n)},o=function(n){return"string"==typeof n||n instanceof String},r=function(n){return!o(n)&&!c(n)&&null!=n&&null!=n&&(n&&"[object Date]"===Object.prototype.toString.call(n)&&!isNaN(n))},c=function(n){return Array.isArray(n)},f=function(){var t=this,o=document.getElementById("popup-iframe"),r="";t.onPopupOpen=function(n){if(!s(n))return!1;n.title;var e=n.url||"";if(r===e)return!1;r=e;var t=encodeURIComponent(e),i=u+t;setTimeout(function(){o.setAttribute("src",i),o.classList.remove("hidden")},250)},t.init=function(){if(n.slug===a){var e=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(e),safari.application.addEventListener("popover",function(n){r!==e.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else browser.tabs.query({active:!0,currentWindow:!0},function(n){if(!n||!c(n))return!1;var e=n[0];t.onPopupOpen(e)})}};if(n.slug===a){var p=new f;p.init()}else document.addEventListener("DOMContentLoaded",function(){(new f).init()}); \ No newline at end of file +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(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.css b/build/firefox/sidebar/sidebar.css new file mode 100644 index 0000000..eed761f --- /dev/null +++ b/build/firefox/sidebar/sidebar.css @@ -0,0 +1,4 @@ +/* Automatically generated file. Do not edit directly. +Copyright (C) 2019 Gab AI, Inc. +All Rights Reserved */ +*{margin:0;padding:0;border:0;outline:0;box-sizing:border-box}body,html{display:block}.hidden{display:none!important}.abs{position:absolute}.rel{position:relative}.sidebar{display:block;min-width:100%;min-height:100vh;height:100%;width:100%;overflow:hidden}.sidebar *{display:block;height:100%;width:100%;min-width:100%;min-height:100vh}.sidebar__inner{background:url(../assets/images/icons/spinner.svg) no-repeat center/60px 60px} \ No newline at end of file diff --git a/build/firefox/sidebar/sidebar.html b/build/firefox/sidebar/sidebar.html new file mode 100644 index 0000000..7f4efd6 --- /dev/null +++ b/build/firefox/sidebar/sidebar.html @@ -0,0 +1,4 @@ + +Dissenter \ No newline at end of file diff --git a/build/firefox/sidebar/sidebar.js b/build/firefox/sidebar/sidebar.js new file mode 100644 index 0000000..ffb777b --- /dev/null +++ b/build/firefox/sidebar/sidebar.js @@ -0,0 +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",COLOR_GAB_GREEN="#21cf7b",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(){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); \ No newline at end of file diff --git a/build/safari/dissenter.safariextension/Info.plist b/build/safari/dissenter.safariextension/Info.plist index 4c86203..c0327a1 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.1 + 0.1.2 CFBundleVersion 1 Chrome diff --git a/build/safari/dissenter.safariextension/popup/popup.css b/build/safari/dissenter.safariextension/popup/popup.css index 66a9ccd..113cd90 100644 --- a/build/safari/dissenter.safariextension/popup/popup.css +++ b/build/safari/dissenter.safariextension/popup/popup.css @@ -1,4 +1,4 @@ /* Automatically generated file. Do not edit directly. Copyright (C) 2019 Gab AI, Inc. All Rights Reserved */ -*{margin:0;padding:0;border:0;outline:0;box-sizing:border-box}body,html{display:block}.hidden{display:none!important}.abs{position:absolute}.rel{position:relative}.popup{display:block;min-width:420px;min-height:600px;overflow:hidden;color:#000;background-color:#fff}.popup *{display:block;height:600px;width:420px}.popup__inner{background:url(../assets/images/icons/spinner.svg) no-repeat center/60px 60px} \ No newline at end of file +*{margin:0;padding:0;border:0;outline:0;box-sizing:border-box}body,html{display:block}.hidden{display:none!important}.abs{position:absolute}.rel{position:relative}.popup{display:block;min-width:420px;min-height:600px;overflow:hidden;background-color:#fff}.popup *{display:block;height:100vh;width:100vw}.popup__inner{background:url(../assets/images/icons/spinner.svg) no-repeat center/60px 60px} \ No newline at end of file diff --git a/build/safari/dissenter.safariextension/popup/popup.html b/build/safari/dissenter.safariextension/popup/popup.html index 6b45849..e60f02b 100644 --- a/build/safari/dissenter.safariextension/popup/popup.html +++ b/build/safari/dissenter.safariextension/popup/popup.html @@ -1,4 +1,4 @@ -Dissenter \ No newline at end of file +Dissenter \ No newline at end of file diff --git a/build/safari/dissenter.safariextension/popup/popup.js b/build/safari/dissenter.safariextension/popup/popup.js index 69d8dcc..6edceff 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 n={name:"Apple Safari",slug:"safari",version:"0.1.1"},e="chrome",t="firefox",i="edge",a="safari",u="https://dissenter.com/discussion/begin-extension?url=",s=function(n){return!c(n)&&!o(n)&&(null!==n&&"object"==typeof n)},r=function(n){return"string"==typeof n||n instanceof String},o=function(n){return!r(n)&&!c(n)&&null!=n&&null!=n&&(n&&"[object Date]"===Object.prototype.toString.call(n)&&!isNaN(n))},c=function(n){return Array.isArray(n)},f=function(){var t=this,r=document.getElementById("popup-iframe"),o="";t.onPopupOpen=function(n){if(!s(n))return!1;n.title;var e=n.url||"";if(o===e)return!1;o=e;var t=encodeURIComponent(e),i=u+t;setTimeout(function(){r.setAttribute("src",i),r.classList.remove("hidden")},250)},t.init=function(){if(n.slug===a){var e=safari.application.activeBrowserWindow.activeTab;t.onPopupOpen(e),safari.application.addEventListener("popover",function(n){o!==e.url&&safari.extension.popovers[0].contentWindow.location.reload()},!0)}else browser.tabs.query({active:!0,currentWindow:!0},function(n){if(!n||!c(n))return!1;var e=n[0];t.onPopupOpen(e)})}};if(n.slug===a){var p=new f;p.init()}else document.addEventListener("DOMContentLoaded",function(){(new f).init()}); \ No newline at end of file +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",COLOR_GAB_GREEN="#21cf7b",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),r=BASE_URI+t;setTimeout(function(){i.setAttribute("src",r),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