<commit_before>CloudFlare.define(
    "stop_censorship",
    ["cloudflare/jquery1.7", "cloudflare/user", "cloudflare/dom", "cloudflare/path", "cloudflare/console", "stop_censorship/config"],
    function($, user, dom, path, console, _config) {

        var SopaProtest = function SopaProtest(config){
            var self=this
            self.config = config
            if (config.onCloudflare) {
                self.cookie = "__cfduid"
            }
        }

        var cdnPath = "//ajax.cloudflare.com/cdn-cgi/nexp/";

        var config = $.extend({
            selector : "header, h1, h2, h3, p, li, span, em",
            position_x : "right",
            onCloudflare : false,
            regex : '.{5}'
        }, _config)

        config.regex = new RegExp(config.regex)

        var sopaProtest = new SopaProtest(config)

        //jquery.liteDialog
        ;(function(a){var p="hyLite";function c(e){e.keyCode===27&&a.liteDialog("hide")}var d={init:function(e){var b={html:"",modal:!1,shadow:"#000",shadowRadius:"25px",background:"#FFF",color:"#000",width:"300px",padding:"10px",zIndex:9000};e&&a.extend(b,e);a("#"+p+"Shdw").length===0&&a("<div id='"+p+"Shdw' style='position:fixed;top:0;left:0;'>").hide().css({height:a(document).height(),width:a(document).width()}).appendTo(document.body);a("#"+p+"Dlg").length===0&&a("<div id='"+p+"Dlg' style='position:absolute;'>").hide().appendTo(document.body); a("#"+p+"Shdw").css({background:b.shadow,'z-index':b.zIndex}).fadeTo("fast",0.4);a("#"+p+"Dlg").html(b.html).width(b.width).css({"box-shadow":"0px 0px "+b.shadowRadius+" "+b.shadow,"-moz-box-shadow":"0px 0px "+b.shadowRadius+" "+b.shadow,"-webkit-box-shadow":"0px 0px "+b.shadowRadius+" "+b.shadow,color:b.color,background:b.background,padding:b.padding,top:(a(window).height()-a("#"+p+"Dlg").outerHeight())/2+a(window).scrollTop(),left:(a(window).width()-a("#"+p+"Dlg").outerWidth())/2+a(window).scrollLeft(),'z-index':b.zIndex}).fadeIn(); b.modal?(a("#"+p+"Shdw, #"+p+"Dlg").unbind(),a(document).unbind("keyup",c)):(a("#"+p+"Shdw, #"+p+"Dlg").click(function(){a.liteDialog("hide")}),a(document).keyup(c))},hide:function(){a("#"+p+"Shdw, #"+p+"Dlg").fadeOut()}};a.liteDialog=a.fn.liteDialog=function(a){return d[a]?d[a].apply(this,Array.prototype.slice.call(arguments,1)):typeof a==="object"||!a?d.init.apply(this,arguments):d.init.apply(this,[{html:a}])}})($);


        $.extend(SopaProtest.prototype, {
            badge : function(){
                var self = this,
                    side = /^right$|^left$/i.test(self.config.position_x) ? self.config.position_x.toLowerCase() : 'right';

                return $("<img src='" + cdnPath + "images/badge.png' class='sopa_badge cfcensorship_" + side + (dom.internetExplorer < 9 ? " ie" : "") + "'>")
                            .bind("click", function(){ self.inspirationalDialog() })
            },
            placeBadge : function(){
                if(!$("body").find(".sopa_badge").length) {
                    $("body").append(this.badge())
                }
            },

            tweetWindow : function(options) {
                window.open(
                    "https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fcloudflare.com"+
                    "&text="+encodeURIComponent(options.text)+
                    "&url="+encodeURIComponent(options.url)+
                    "&hashtags="+encodeURIComponent(options.hashtag)+
                    "&via=cloudflare",
                    "_blank",
                    "height=450,left=445,personalbar=0,resiable=1,scrollbars=1,toolbar=0,top=225,width=550"
                );
            },

            senatorDropdown: function(){
                var senators =[["AK","<NAME>","907-456-0233"],["AK","<NAME>","907-271-5915"],["AL","Jefferson Sessions","334-244-7017"],["AL","<NAME>","205-759-5047"],["AR","<NAME>","479-725-0400"],["AR","<NAME>","501-324-6336"],["AZ","<NAME>","602-840-1891"],["AZ","<NAME>","602-952-2410"],["CA","<NAME>","510-286-8537"],["CA","<NAME>","415-393-0707"],["CO","<NAME>","303-455-7600"],["CO","<NAME>","303-650-7820"],["CT","<NAME>","860-258-6940"],["CT","<NAME>","860-549-8463"],["DE","<NAME>","302-573-6291"],["DE","<NAME>","302-573-6345"],["FL","<NAME>","407-872-7161"],["FL","<NAME>","305-418-8553"],["GA","<NAME>","770-763-9090"],["GA","<NAME>","770-661-0999"],["HI","<NAME>","808-522-8970"],["HI","<NAME>","808-541-2542"],["IA","<NAME>","515-288-1145"],["IA","<NAME>","515-284-4574"],["ID","<NAME>","208-334-1776"],["ID","<NAME>","208-342-7985"],["IL","<NAME>","312-353-4952"],["IL","<NAME>","312-886-3506"],["IN","<NAME>","317-554-0750"],["IN","<NAME>","317-226-5555"],["KS","<NAME>","913-451-9343"],["KY","<NAME>","502-582-6304"],["KY","<NAME>","361-576-1231"],["LA","<NAME>","225-389-0395"],["LA","<NAME>","337-262-6898"],["MA","<NAME>","617-565-3170"],["MA","<NAME>","617-565-8519"],["MD","<NAME>","410-962-4510"],["ME","<NAME>","207-945-0417"],["ME","<NAME>","207-874-0883"],["MI","<NAME>","313-226-6020"],["MI","<NAME>","517-203-1760"],["MN","<NAME>","651-221-1016"],["MN","<NAME>","612-727-5220"],["MO","<NAME>","816-471-7141"],["MO","<NAME>","816-421-1639"],["MS","<NAME>","601-965-4459"],["MS","<NAME>","601-965-4644"],["MT","<NAME>","406-657-6790"],["MT","<NAME>","406-449-5401"],["NC","<NAME>","910-251-1058"],["NC","<NAME>","336-333-5311"],["ND","<NAME>","701-258-4648"],["ND","<NAME>","701-250-4618"],["NE","<NAME>","308-632-6032"],["NE","<NAME>","402-441-4600"],["NH","<NAME>","603-622-7979"],["NH","<NAME>","603-647-7500"],["NJ","<NAME>","973-639-8700"],["NJ","<NAME>","973-645-3030"],["NM","<NAME>","505-346-6601"],["NM","<NAME>","505-346-6791"],["NV","<NAME>","775-686-5770"],["NV","<NAME>","702-388-5020"],["NY","<NAME>","212-688-6262"],["NY","<NAME>","212-486-4430"],["OH","<NAME>","216-522-7272"],["OK","<NAME>","918-748-5111"],["OK","<NAME>","918-581-7651"],["OR","<NAME>","503-326-3386"],["PA","<NAME>","570-941-0930"],["PA","<NAME>","610-434-1444"],["RI","<NAME>","401-943-3100"],["RI","<NAME>","401-453-5294"],["SC","<NAME>","864-233-5366"],["SC","<NAME>","864-250-1417"],["SD","<NAME>","414-276-7282"],["SD","<NAME>","605-334-9596"],["TN","<NAME>","615-736-5129"],["TN","<NAME>","423-756-2757"],["TX","<NAME>","512-469-6034"],["TX","<NAME>","214-361-3500"],["UT","O<NAME>","801-524-4380"],["UT","<NAME>","801-524-5933"],["VA","<NAME>","804-775-2314"],["VA","<NAME>","804-771-2221"],["VT","<NAME>","802-863-2525"],["VT","<NAME>","802-862-0697"],["WA","<NAME>","206-553-5545"],["WI","<NAME>","605-332-8896"],["WI","<NAME>","414-297-4451"],["WV","<NAME>","304-342-5855"],["WV","<NAME>","304-347-5372"],["WY","<NAME>","307-261-6413"],["WY","<NAME>","307-682-6268</span>"]]
                var senatorsByState = {}
                $.each(senators, function(i, senator){
                    var state = $.trim(senator[0]);

                    senatorsByState[state] = senatorsByState[state] || [];
                    senatorsByState[state].push(senator.slice(1));

                })
                var target = $("<div class='senator_info'>")
                var dropdown = $("<select id='StopCensorshipStates'>").bind("change", function(){
                    var state = $(this).val()
                    var senators = senatorsByState[state]
                    console.log(state + " - " + senators)

                    target.html(senators[0].join(', ') + (senators.length > 1 ? '<br />' + senators[1].join(', ') : ''))
                })
                var label = $("<label for='StopCensorshipStates'>Select your state</label>");
                $.each(senatorsByState, function(state, senators){
                    dropdown.append(
                        $("<option>", {text: state})
                    )
                })
                return $("<div></div>").append(label).append(dropdown).append(target)
            },

            protestContent : function() {
                var self = this;
                var twitterHandle = this.config.twitterHandle,
                    censorshipUrl = "http://americancensorship.org/",
                    githubUrl = "http://mikesofaer.github.com/stop_censorship/",
                    hashtag = "savetheweb",
                    fftfUrl = "http://fightforthefuture.org/pipa",
                    tweetText = function() {

                        var locationParts = path.parseURL(window.location.toString());

                        locationParts.path = "";
                        locationParts.query = "";
                        locationParts.hash = "";

                        var fullURL = path.stringifyURL(locationParts),
                            host = locationParts.host;

                        return twitterHandle ?
                            "Thank you @" + twitterHandle + " for helping defend the Internet from censorship" :
                            "Thank you " + fullURL + " (" + host + ") for helping defend the Internet from censorship";

                    },
                    box = $("<div class='sopa_popup'><h2>Help Protect Freedom.</h2></div>"),
                    tweet = $("<button>",{type:'button'}).text("Tweet about it.")<commit_msg>Don't duplicate the URL<commit_after>CloudFlare.define(
    "stop_censorship",
    ["cloudflare/jquery1.7", "cloudflare/user", "cloudflare/dom", "cloudflare/path", "cloudflare/console", "stop_censorship/config"],
    function($, user, dom, path, console, _config) {

        var SopaProtest = function SopaProtest(config){
            var self=this
            self.config = config
            if (config.onCloudflare) {
                self.cookie = "__cfduid"
            }
        }

        var cdnPath = "//ajax.cloudflare.com/cdn-cgi/nexp/";

        var config = $.extend({
            selector : "header, h1, h2, h3, p, li, span, em",
            position_x : "right",
            onCloudflare : false,
            regex : '.{5}'
        }, _config)

        config.regex = new RegExp(config.regex)

        var sopaProtest = new SopaProtest(config)

        //jquery.liteDialog
        ;(function(a){var p="hyLite";function c(e){e.keyCode===27&&a.liteDialog("hide")}var d={init:function(e){var b={html:"",modal:!1,shadow:"#000",shadowRadius:"25px",background:"#FFF",color:"#000",width:"300px",padding:"10px",zIndex:9000};e&&a.extend(b,e);a("#"+p+"Shdw").length===0&&a("<div id='"+p+"Shdw' style='position:fixed;top:0;left:0;'>").hide().css({height:a(document).height(),width:a(document).width()}).appendTo(document.body);a("#"+p+"Dlg").length===0&&a("<div id='"+p+"Dlg' style='position:absolute;'>").hide().appendTo(document.body); a("#"+p+"Shdw").css({background:b.shadow,'z-index':b.zIndex}).fadeTo("fast",0.4);a("#"+p+"Dlg").html(b.html).width(b.width).css({"box-shadow":"0px 0px "+b.shadowRadius+" "+b.shadow,"-moz-box-shadow":"0px 0px "+b.shadowRadius+" "+b.shadow,"-webkit-box-shadow":"0px 0px "+b.shadowRadius+" "+b.shadow,color:b.color,background:b.background,padding:b.padding,top:(a(window).height()-a("#"+p+"Dlg").outerHeight())/2+a(window).scrollTop(),left:(a(window).width()-a("#"+p+"Dlg").outerWidth())/2+a(window).scrollLeft(),'z-index':b.zIndex}).fadeIn(); b.modal?(a("#"+p+"Shdw, #"+p+"Dlg").unbind(),a(document).unbind("keyup",c)):(a("#"+p+"Shdw, #"+p+"Dlg").click(function(){a.liteDialog("hide")}),a(document).keyup(c))},hide:function(){a("#"+p+"Shdw, #"+p+"Dlg").fadeOut()}};a.liteDialog=a.fn.liteDialog=function(a){return d[a]?d[a].apply(this,Array.prototype.slice.call(arguments,1)):typeof a==="object"||!a?d.init.apply(this,arguments):d.init.apply(this,[{html:a}])}})($);


        $.extend(SopaProtest.prototype, {
            badge : function(){
                var self = this,
                    side = /^right$|^left$/i.test(self.config.position_x) ? self.config.position_x.toLowerCase() : 'right';

                return $("<img src='" + cdnPath + "images/badge.png' class='sopa_badge cfcensorship_" + side + (dom.internetExplorer < 9 ? " ie" : "") + "'>")
                            .bind("click", function(){ self.inspirationalDialog() })
            },
            placeBadge : function(){
                if(!$("body").find(".sopa_badge").length) {
                    $("body").append(this.badge())
                }
            },

            tweetWindow : function(options) {
                window.open(
                    "https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fcloudflare.com"+
                    "&text="+encodeURIComponent(options.text)+
                    "&url="+encodeURIComponent(options.url)+
                    "&hashtags="+encodeURIComponent(options.hashtag)+
                    "&via=cloudflare",
                    "_blank",
                    "height=450,left=445,personalbar=0,resiable=1,scrollbars=1,toolbar=0,top=225,width=550"
                );
            },

            senatorDropdown: function(){
                var senators =[["AK","<NAME>","907-456-0233"],["AK","<NAME>","907-271-5915"],["AL","<NAME>","334-244-7017"],["AL","<NAME>","205-759-5047"],["AR","<NAME>","479-725-0400"],["AR","<NAME>","501-324-6336"],["AZ","<NAME>","602-840-1891"],["AZ","<NAME>","602-952-2410"],["CA","<NAME>","510-286-8537"],["CA","<NAME>","415-393-0707"],["CO","<NAME>","303-455-7600"],["CO","<NAME>","303-650-7820"],["CT","<NAME>","860-258-6940"],["CT","<NAME>","860-549-8463"],["DE","<NAME>","302-573-6291"],["DE","<NAME>","302-573-6345"],["FL","<NAME>","407-872-7161"],["FL","<NAME>","305-418-8553"],["GA","<NAME>","770-763-9090"],["GA","<NAME>","770-661-0999"],["HI","<NAME>","808-522-8970"],["HI","<NAME>","808-541-2542"],["IA","<NAME>","515-288-1145"],["IA","<NAME>","515-284-4574"],["ID","<NAME>","208-334-1776"],["ID","<NAME>","208-342-7985"],["IL","<NAME>","312-353-4952"],["IL","<NAME>","312-886-3506"],["IN","<NAME>","317-554-0750"],["IN","<NAME>","317-226-5555"],["KS","<NAME>","913-451-9343"],["KY","<NAME>","502-582-6304"],["KY","<NAME>","361-576-1231"],["LA","<NAME>","225-389-0395"],["LA","<NAME>","337-262-6898"],["MA","<NAME>","617-565-3170"],["MA","<NAME>","617-565-8519"],["MD","<NAME>","410-962-4510"],["ME","<NAME>","207-945-0417"],["ME","<NAME>","207-874-0883"],["MI","<NAME>","313-226-6020"],["MI","<NAME>","517-203-1760"],["MN","<NAME>","651-221-1016"],["MN","<NAME>","612-727-5220"],["MO","<NAME>","816-471-7141"],["MO","<NAME>","816-421-1639"],["MS","<NAME>","601-965-4459"],["MS","<NAME>","601-965-4644"],["MT","<NAME>","406-657-6790"],["MT","<NAME>","406-449-5401"],["NC","<NAME>","910-251-1058"],["NC","<NAME>","336-333-5311"],["ND","<NAME>","701-258-4648"],["ND","<NAME>","701-250-4618"],["NE","<NAME>","308-632-6032"],["NE","<NAME>","402-441-4600"],["NH","<NAME>","603-622-7979"],["NH","<NAME>","603-647-7500"],["NJ","<NAME>","973-639-8700"],["NJ","<NAME>","973-645-3030"],["NM","<NAME>","505-346-6601"],["NM","<NAME>","505-346-6791"],["NV","<NAME>","775-686-5770"],["NV","<NAME>","702-388-5020"],["NY","<NAME>","212-688-6262"],["NY","<NAME>","212-486-4430"],["OH","<NAME>","216-522-7272"],["OK","<NAME>","918-748-5111"],["OK","<NAME>","918-581-7651"],["OR","<NAME>","503-326-3386"],["PA","<NAME>","570-941-0930"],["PA","<NAME>","610-434-1444"],["RI","<NAME>","401-943-3100"],["RI","<NAME>","401-453-5294"],["SC","<NAME>","864-233-5366"],["SC","<NAME>","864-250-1417"],["SD","<NAME>","414-276-7282"],["SD","<NAME>","605-334-9596"],["TN","<NAME>","615-736-5129"],["TN","<NAME>","423-756-2757"],["TX","<NAME>","512-469-6034"],["TX","<NAME>","214-361-3500"],["UT","O<NAME>","801-524-4380"],["UT","<NAME>","801-524-5933"],["VA","<NAME>","804-775-2314"],["VA","<NAME>","804-771-2221"],["VT","<NAME>","802-863-2525"],["VT","<NAME>","802-862-0697"],["WA","<NAME>","206-553-5545"],["WI","<NAME>","605-332-8896"],["WI","<NAME>","414-297-4451"],["WV","<NAME>","304-342-5855"],["WV","<NAME>","304-347-5372"],["WY","<NAME>","307-261-6413"],["WY","<NAME>","307-682-6268</span>"]]
                var senatorsByState = {}
                $.each(senators, function(i, senator){
                    var state = $.trim(senator[0]);

                    senatorsByState[state] = senatorsByState[state] || [];
                    senatorsByState[state].push(senator.slice(1));

                })
                var target = $("<div class='senator_info'>")
                var dropdown = $("<select id='StopCensorshipStates'>").bind("change", function(){
                    var state = $(this).val()
                    var senators = senatorsByState[state]
                    console.log(state + " - " + senators)

                    target.html(senators[0].join(', ') + (senators.length > 1 ? '<br />' + senators[1].join(', ') : ''))
                })
                var label = $("<label for='StopCensorshipStates'>Select your state</label>");
                $.each(senatorsByState, function(state, senators){
                    dropdown.append(
                        $("<option>", {text: state})
                    )
                })
                return $("<div></div>").append(label).append(dropdown).append(target)
            },

            protestContent : function() {
                var self = this;
                var twitterHandle = this.config.twitterHandle,
                    censorshipUrl = "http://americancensorship.org/",
                    githubUrl = "http://mikesofaer.github.com/stop_censorship/",
                    hashtag = "savetheweb",
                    fftfUrl = "http://fightforthefuture.org/pipa",
                    tweetText = function() {

                        var locationParts = path.parseURL(window.location.toString());

                        locationParts.path = "";
                        locationParts.query = "";
                        locationParts.hash = "";

                        var fullURL = path.stringifyURL(locationParts)

                        return twitterHandle ?
                            "Thank you @" + twitterHandle + " for helping defend the Internet from censorship" :
                            "Thank you " + fullURL + " for helping defend the Internet from censorship";

                    },
                    box = $("<div class='sopa_popup'><h2>Help Protect Freedom.</h2></div>"),
                    tweet = $("<button>",{type:'button'}).text("Tweet about it.")
{'fraction_non_alphanumeric': 0.2822089257287149, 'fraction_numerical': 0.1117637371685788, 'mean_word_length': 3.2785345232503524, 'pattern_counts': {'":': 6, '<': 228, '<?xml version=': 0, '>': 228, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3000106', 'n_tokens_mistral': 7677, 'n_tokens_neox': 6273, 'n_words': 466}