Advertisement
LooseStool

Gab Dissenter View-Comments Button (HTML and Javascript)

Feb 24th, 2020
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- DissenterViewCommentsButton.html.and.js.START -->
  2. <div id="Dissenter_Wrapper" style="clear: both; float: left; width: 100%;"></div>
  3. <script>
  4. // Gab Dissenter View-Comments Button (HTML and Javascript)
  5. // https://pastebin.com/Gx8kmJps https://pastebin.com/u/LooseStool
  6. // A more generic version of what I saw here:
  7. // https://www.libertariannews.org/2019/10/20/trends-gab-com-the-new-non-cucked-drudge-report/
  8.     var _GD = function(WebpageAfterRedirects, WebsiteOwner, DivWrapper, DivHtml, TextColor, ButtonText, FunctionTwoArgs, Dimensions) {
  9.         var G = function(id) { return document.getElementById ? document.getElementById(id) : document.all(id); }
  10.         , DivInclude = "Dissenter_IncludeToNotify"
  11.         , LinkClick = "Dissenter_LinkToClick"
  12.         , DivView = "Dissenter_ViewText";
  13.         G(DivWrapper ? DivWrapper : "Dissenter_Wrapper").innerHTML = DivHtml ? DivHtml : (
  14.             '<div style="display: block !important; width: 100% !important; height: 80px !important; padding: 20px 0px !important;'
  15.             +       'overflow: hidden !important; box-sizing: border-box !important;">'
  16.             +   '<div id="Dissenter_IncludeToNotify" style="text-align: center !important;"></div>'
  17.             +   '<a id="Dissenter_LinkToClick" style="display: block !important; width: 100% !important; height: 42px !important;'
  18.             +       'background-color: rgb(33, 207, 123) !important; border-radius: 4px !important;'
  19.             +       'text-align: center !important; margin: 0px auto !important; box-sizing: border-box !important; cursor: pointer !important;">'
  20.             +           '<div id="Dissenter_ViewText" style="!important; line-height: 40px !important; font-size: 14px !important;"></div>'
  21.             +   '</a>'
  22.             + '</div>'
  23.         );
  24.         if(WebsiteOwner) { G(DivInclude).innerHTML =  "Include " + WebsiteOwner + " on a Dissenter comment to notify me of your post." };
  25.         G(DivView).style.color = TextColor ? TextColor : "rgb(255, 255, 255)";                  //optional TextColor
  26.         G(DivView).innerHTML = ButtonText ? ButtonText : "View Comments on Dissenter";              //optional ButtonText
  27.         G(LinkClick).onclick = function() { return ( FunctionTwoArgs ? FunctionTwoArgs : function(url, dim) {   //optional FunctionTwoArgs
  28.             window.open( "https://dissenter.com/discussion/begin?url=" + encodeURIComponent(url)    // /begin seems to be the same result as /begin-extension used by the inspiration for this code snippet: https://www.libertariannews.org/2019/10/20/trends-gab-com-the-new-non-cucked-drudge-report/ )
  29.                 , "_blank", "toolbar=no,scrollbars=yes,resizable=yes,"
  30.                 + ( dim ? dim : "top=0,left=500,width=450,height=800" )                 //optional Dimensions
  31.             );
  32.         } )( WebpageAfterRedirects || location.href, Dimensions ); };
  33.     };
  34.     window.setTimeout( function(){
  35.         _GD( "https://www.google.com", "@NarrativeController" );
  36.     }, 17 );
  37. </script>
  38. <!-- DissenterViewCommentsButton.html.and.js.FINISH -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement