text: /* 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.6"},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_DISSENTER_BLUE="#4040FF",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)))});