How to use anonymous method in wpt

Best JavaScript code snippet using wpt

background.js

Source:background.js Github

copy

Full Screen

1var settings = {2 'CountryList': [{"code":"", "name":"Not specified", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"A1", "name":"Anonymous Proxy", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"A2", "name":"Satellite Provider", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"O1", "name":"Other Country", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AD", "name":"Andorra", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AE", "name":"United Arab Emirates", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AF", "name":"Afghanistan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AG", "name":"Antigua and Barbuda", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AI", "name":"Anguilla", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AL", "name":"Albania", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AM", "name":"Armenia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AO", "name":"Angola", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AP", "name":"Asia/Pacific Region", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AQ", "name":"Antarctica", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AR", "name":"Argentina", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AS", "name":"American Samoa", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AT", "name":"Austria", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AU", "name":"Australia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AW", "name":"Aruba", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AX", "name":"Aland Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"AZ", "name":"Azerbaijan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BA", "name":"Bosnia and Herzegovina", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BB", "name":"Barbados", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BD", "name":"Bangladesh", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BE", "name":"Belgium", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BF", "name":"Burkina Faso", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BG", "name":"Bulgaria", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BH", "name":"Bahrain", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BI", "name":"Burundi", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BJ", "name":"Benin", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BL", "name":"Saint Bartelemey", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BM", "name":"Bermuda", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BN", "name":"Brunei Darussalam", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BO", "name":"Bolivia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BQ", "name":"Bonaire, Saint Eustatius and Saba", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BR", "name":"Brazil", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BS", "name":"Bahamas", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BT", "name":"Bhutan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BV", "name":"Bouvet Island", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BW", "name":"Botswana", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BY", "name":"Belarus", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"BZ", "name":"Belize", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CA", "name":"Canada", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CC", "name":"Cocos (Keeling) Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CD", "name":"Congo, The Democratic Republic of the", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CF", "name":"Central African Republic", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CG", "name":"Congo", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CH", "name":"Switzerland", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CI", "name":"Cote d'Ivoire", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CK", "name":"Cook Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CL", "name":"Chile", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CM", "name":"Cameroon", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CN", "name":"China", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CO", "name":"Colombia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CR", "name":"Costa Rica", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CU", "name":"Cuba", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CV", "name":"Cape Verde", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CW", "name":"Curacao", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CX", "name":"Christmas Island", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CY", "name":"Cyprus", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"CZ", "name":"Czech Republic", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"DE", "name":"Germany", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"DJ", "name":"Djibouti", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"DK", "name":"Denmark", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"DM", "name":"Dominica", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"DO", "name":"Dominican Republic", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"DZ", "name":"Algeria", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"EC", "name":"Ecuador", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"EE", "name":"Estonia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"EG", "name":"Egypt", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"EH", "name":"Western Sahara", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"ER", "name":"Eritrea", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"ES", "name":"Spain", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"ET", "name":"Ethiopia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"EU", "name":"Europe", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"FI", "name":"Finland", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"FJ", "name":"Fiji", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"FK", "name":"Falkland Islands (Malvinas)", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"FM", "name":"Micronesia, Federated States of", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"FO", "name":"Faroe Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"FR", "name":"France", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GA", "name":"Gabon", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GB", "name":"United Kingdom", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GD", "name":"Grenada", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GE", "name":"Georgia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GF", "name":"French Guiana", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GG", "name":"Guernsey", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GH", "name":"Ghana", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GI", "name":"Gibraltar", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GL", "name":"Greenland", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GM", "name":"Gambia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GN", "name":"Guinea", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GP", "name":"Guadeloupe", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GQ", "name":"Equatorial Guinea", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GR", "name":"Greece", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GS", "name":"South Georgia and the South Sandwich Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GT", "name":"Guatemala", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GU", "name":"Guam", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GW", "name":"Guinea-Bissau", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"GY", "name":"Guyana", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"HK", "name":"Hong Kong", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"HM", "name":"Heard Island and McDonald Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"HN", "name":"Honduras", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"HR", "name":"Croatia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"HT", "name":"Haiti", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"HU", "name":"Hungary", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"ID", "name":"Indonesia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"IE", "name":"Ireland", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"IL", "name":"Israel", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"IM", "name":"Isle of Man", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"IN", "name":"India", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"IO", "name":"British Indian Ocean Territory", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"IQ", "name":"Iraq", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"IR", "name":"Iran, Islamic Republic of", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"IS", "name":"Iceland", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"IT", "name":"Italy", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"JE", "name":"Jersey", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"JM", "name":"Jamaica", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"JO", "name":"Jordan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"JP", "name":"Japan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KE", "name":"Kenya", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KG", "name":"Kyrgyzstan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KH", "name":"Cambodia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KI", "name":"Kiribati", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KM", "name":"Comoros", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KN", "name":"Saint Kitts and Nevis", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KP", "name":"Korea, Democratic People's Republic of", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KR", "name":"Korea, Republic of", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KW", "name":"Kuwait", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KY", "name":"Cayman Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"KZ", "name":"Kazakhstan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LA", "name":"Lao People's Democratic Republic", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LB", "name":"Lebanon", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LC", "name":"Saint Lucia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LI", "name":"Liechtenstein", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LK", "name":"Sri Lanka", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LR", "name":"Liberia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LS", "name":"Lesotho", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LT", "name":"Lithuania", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LU", "name":"Luxembourg", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LV", "name":"Latvia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"LY", "name":"Libyan Arab Jamahiriya", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MA", "name":"Morocco", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MC", "name":"Monaco", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MD", "name":"Moldova, Republic of", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"ME", "name":"Montenegro", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MF", "name":"Saint Martin", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MG", "name":"Madagascar", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MH", "name":"Marshall Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MK", "name":"Macedonia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"ML", "name":"Mali", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MM", "name":"Myanmar", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MN", "name":"Mongolia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MO", "name":"Macao", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MP", "name":"Northern Mariana Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MQ", "name":"Martinique", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MR", "name":"Mauritania", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MS", "name":"Montserrat", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MT", "name":"Malta", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MU", "name":"Mauritius", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MV", "name":"Maldives", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MW", "name":"Malawi", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MX", "name":"Mexico", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MY", "name":"Malaysia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"MZ", "name":"Mozambique", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NA", "name":"Namibia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NC", "name":"New Caledonia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NE", "name":"Niger", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NF", "name":"Norfolk Island", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NG", "name":"Nigeria", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NI", "name":"Nicaragua", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NL", "name":"Netherlands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NO", "name":"Norway", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NP", "name":"Nepal", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NR", "name":"Nauru", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NU", "name":"Niue", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"NZ", "name":"New Zealand", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"OM", "name":"Oman", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PA", "name":"Panama", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PE", "name":"Peru", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PF", "name":"French Polynesia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PG", "name":"Papua New Guinea", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PH", "name":"Philippines", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PK", "name":"Pakistan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PL", "name":"Poland", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PM", "name":"Saint Pierre and Miquelon", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PN", "name":"Pitcairn", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PR", "name":"Puerto Rico", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PS", "name":"Palestinian Territory", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PT", "name":"Portugal", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PW", "name":"Palau", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"PY", "name":"Paraguay", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"QA", "name":"Qatar", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"RE", "name":"Reunion", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"RO", "name":"Romania", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"RS", "name":"Serbia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"RU", "name":"Russian Federation", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"RW", "name":"Rwanda", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SA", "name":"Saudi Arabia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SB", "name":"Solomon Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SC", "name":"Seychelles", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SD", "name":"Sudan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SE", "name":"Sweden", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SG", "name":"Singapore", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SH", "name":"Saint Helena", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SI", "name":"Slovenia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SJ", "name":"Svalbard and Jan Mayen", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SK", "name":"Slovakia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SL", "name":"Sierra Leone", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SM", "name":"San Marino", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SN", "name":"Senegal", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SO", "name":"Somalia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SR", "name":"Suriname", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SS", "name":"South Sudan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"ST", "name":"Sao Tome and Principe", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SV", "name":"El Salvador", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SX", "name":"Sint Maarten", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SY", "name":"Syrian Arab Republic", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"SZ", "name":"Swaziland", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TC", "name":"Turks and Caicos Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TD", "name":"Chad", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TF", "name":"French Southern Territories", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TG", "name":"Togo", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TH", "name":"Thailand", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TJ", "name":"Tajikistan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TK", "name":"Tokelau", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TL", "name":"Timor-Leste", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TM", "name":"Turkmenistan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TN", "name":"Tunisia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TO", "name":"Tonga", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TR", "name":"Turkey", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TT", "name":"Trinidad and Tobago", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TV", "name":"Tuvalu", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TW", "name":"Taiwan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"TZ", "name":"Tanzania, United Republic of", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"UA", "name":"Ukraine", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"UG", "name":"Uganda", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"UM", "name":"United States Minor Outlying Islands", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"US", "name":"United States", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"UY", "name":"Uruguay", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"UZ", "name":"Uzbekistan", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"VA", "name":"Holy See (Vatican City State)", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"VC", "name":"Saint Vincent and the Grenadines", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"VE", "name":"Venezuela", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"VG", "name":"Virgin Islands, British", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"VI", "name":"Virgin Islands, U.S.", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"VN", "name":"Vietnam", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"VU", "name":"Vanuatu", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"WF", "name":"Wallis and Futuna", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"WS", "name":"Samoa", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"YE", "name":"Yemen", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"YT", "name":"Mayotte", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"ZA", "name":"South Africa", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"ZM", "name":"Zambia", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0},{"code":"ZW", "name":"Zimbabwe", "transparent":false, "num_transparent":0, "anonymous":false, "num_anonymous":0, "elite":false, "num_elite":0, "any":false, "num_any":0}],3 'activeCountryList' : [],4 'enabled': false,5 'max_num_proxy': 4,6 'num_proxy': 0,7 'num_proxy_http': 0,8 'num_proxy_http_full': 0,9 'num_proxy_https': 0,10 'num_proxy_https_full': 0,11 'currently_active': 1,12 'flag': 0,13 'alpha': 0.99, //moving average of the download time value. alpha*old+(1-alpha)new14 'query_url': "",15 'default_query_url': "https://api.isthatfreeproxysafe.com/query.php",16 'default_query_country_url': "https://api.isthatfreeproxysafe.com/query_country.php?strategy=2",17 'default_post_url' : "https://api.isthatfreeproxysafe.com/report.php", 18 'default_test_url' : "http://isthatfreeproxysafe.com/test/hello.html",19 'default_test_url_https' : "http://isthatfreeproxysafe.com/test/hello.html", //Just testing responsiveness, do not necessarily need https. see if we can add https.20 'exploration_timer': 50000,21 'exploitation_timer': 30000,22 'request_timer': 4000,23 'retransmissions':0,24 'reload':0,25 'start': [], //we can probably remove this26 'start_event': [],27 'start_first_event': [],28 'data_downloaded':[],29 'push_stats_after': 5,30 'statistics':[],31 'init': 0,32 'exploration': 0,33 'defaul_proxy_ip': "",34 'defaul_proxy_port': "",35 'selection_timeout' : 0,36 'selection_timeout_https' : 0,37 'debug': 0,38 'session_id': 0,39 'enabled_id': 0,40 'strategy': 1,41 'anonimity': "any",42 'region': "",43 'current_anonimity': "any",44 'current_region' : "",45 'optionmenu':null,46 'anonimitymenu':null,47 'messagedisplay':null,48 'messagetodisplay': 0,49 'popup_page_loaded_once': 0,50 'version' : chrome.app.getDetails().version,51 'experiments': 0 //some stuff are used only for simulating human behavior (e.g., retry on failures) in the experiments.52 },53 54 //two strategies are currently available: 55 //strategy 0: probe alle proxies with the actual urls for exploration_time and the use the best for exploitation time. HTTPs round robin only works on domain names (TODO: check and commit experimental code)56 //strategy 1: test all proxy first and eliminates the one with download time double than the minimum one. keep the orioginal ranking and the use the first on.57 //strategy 1 is the best thus used for deployment and all features are supported.58 59 //array of request entry60 requests=[], 61 62 //array of tabs title used for statistics on every page63 titles=[],64 65 //exploration and exploitation timers. useful for the strategy 066 exploration_timeout=0,67 exploitation_timeout=0,68 69 70 71 //initialization function. 72 init = function() {73 if (settings.debug == 1) { console.log("INITIALIZING") }74 //plugin not initialized75 settings.init=276 settings.session_id=Math.floor(Math.random() * 999999999999999); 77 updateIcons();78 79 fetch_countries();80 81 82 //clear proxy list and select random proxy to start the probing from (useful for strategy 0 only).83 ProxyList.proxyListHttp = [];84 ProxyList.fullProxyListHttp = [];85 ProxyList.proxyListHttps = [];86 ProxyList.fullProxyListHttps = [];87 ProxyList.proxyFilterList = [];88 ProxyList.default_proxy = null;89 ProxyList.flag=Math.floor((Math.random() * settings.currently_active) ); 90 //Initialize filter list91 ProxyList.proxyFilterList.push(new Proxy("filter", "filter","","",100000,0,0,0,0,0,["*api.isthatfreeproxysafe.com*"]));92 93 94 //build the query url95 settings.query_url=settings.default_query_url;96 97 if(settings.anonimity=="anonymous"){98 settings.query_url=settings.query_url+"?strategy=7";99 }100 else {101 if(settings.anonimity=="elite")102 {103 settings.query_url=settings.query_url+"?strategy=8";104 }105 else{106 if(settings.anonimity=="transparent")107 {108 settings.query_url=settings.query_url+"?strategy=9";109 }110 else{111 settings.query_url=settings.query_url+"?strategy=6";112 }113 }114 }115 116 117 if(settings.region!=""){118 settings.query_url=settings.query_url+"&region="+settings.region;119 }120 121 122 settings.query_url=settings.query_url+"&version="+settings.version+"&enabled_id="+settings.enabled_id+"&session_id="+settings.session_id;123 124 125 //contact DB server and pull proxies at the beginning of the list 126 var xhr = new XMLHttpRequest();127 xhr.open("GET", settings.query_url, true);128 xhr.onreadystatechange = function() {129 if (this.readyState == 4 && this.status==200) {130 var resp = JSON.parse(xhr.responseText)131 132 for (var i in resp){133 settings.num_proxy_http_full=settings.num_proxy_http_full+1;134 135 ProxyList.fullProxyListHttp.push(new Proxy(i, resp[i]['ip']+":"+resp[i]['port'],resp[i]['ip'],resp[i]['port'],100000,0,0,0,0,0,[]));136 if (settings.debug == 1) { console.log("proxy is "+resp[i]['ip']);}137 if (settings.debug == 1) { console.log(ProxyList.proxyListHttp)}138 139 140 }141 settings.num_proxy_http=Math.min(settings.max_num_proxy,settings.num_proxy_http_full);142 ProxyList.proxyListHttp=ProxyList.fullProxyListHttp.slice(0,settings.num_proxy_http);143 144 145 146 if(settings.num_proxy_http>0){147 148 ProxyList.default_proxy=ProxyList.proxyListHttp[0];149 150 if (settings.debug == 1) { console.log("defaul proxy is "+resp[0]['ip']);}151 if (settings.debug == 1) { console.log(ProxyList.proxyListHttp)}152 153 154 155 updatePac()156 //useful onyl for strategy 1157 if(settings.strategy==1){158 initial_test()159 fetch_https_proxies(); 160 }161 if(settings.strategy==0){162 exploration_timeout=setTimeout(OnExplorationTimerExpired, settings.exploration_timer)163 exploration_timeout=0;164 settings.init=1165 if(settings.popup_page_loaded_once>0){166 updateCurrentMessage(1);167 }168 settings.messagetodisplay=1169 settings.currently_active=settings.num_proxy_http;170 171 updateIcons();172 }173 }174 else{175 176 console.log("NO PROXY FOUND")177 settings.init=0;178 settings.session_id=0; 179 stop();180 console.log("NO PROXY FOUND")181 }182 183 }184 else if (this.readyState == 4 && this.status != 200){185 if (settings.debug == 1) { console.log("Error in connecting to db")}186 }187 }188 xhr.send();189 190 clearTimeout(exploration_timeout)191 clearTimeout(exploitation_timeout)192 193 //in case of strategy 0 we need to initialize the timer for exploration (which will then set the exploitation)194 //also the plugin is initialized at this point195 196 197 },198 199 fetch_countries=function(){200 settings.activeCountryList=[];201 202 settings.CountryList[0].transparent=false;203 settings.CountryList[0].anonymous=false;204 settings.CountryList[0].elite=false;205 settings.CountryList[0].any=false;206 settings.CountryList[0].num_transparent=0;207 settings.CountryList[0].num_anonymous=0;208 settings.CountryList[0].num_elite=0;209 settings.CountryList[0].num_any=0;210 settings.activeCountryList.push(settings.CountryList[0]);211 212 var xhr = new XMLHttpRequest();213 xhr.open("GET", settings.default_query_country_url+"&version="+settings.version+"&enabled_id="+settings.enabled_id+"&session_id="+settings.session_id, true);214 xhr.onreadystatechange = function() {215 if (this.readyState == 4 && this.status==200) {216 var resp = JSON.parse(xhr.responseText)217 for (var i in resp){218 index=settings.CountryList.map(function(e) {return e.code}).indexOf(resp[i]['code']);219 settings.CountryList[index].transparent=resp[i]['transparent'];220 settings.CountryList[0].transparent=(settings.CountryList[0].transparent || settings.CountryList[index].transparent);221 settings.CountryList[index].anonymous=resp[i]['anonymous'];222 settings.CountryList[0].anonymous=(settings.CountryList[0].anonymous || settings.CountryList[index].anonymous);223 settings.CountryList[index].elite=resp[i]['elite'];224 settings.CountryList[0].anonymous=(settings.CountryList[0].elite || settings.CountryList[index].elite);225 settings.CountryList[index].any=resp[i]['any'];226 settings.CountryList[0].any=(settings.CountryList[0].any || settings.CountryList[index].any);227 settings.CountryList[index].num_transparent=parseInt(resp[i]['num_transparent']);228 if(resp[i]['num_transparent']!="None"){229 settings.CountryList[0].num_transparent=settings.CountryList[0].num_transparent+settings.CountryList[index].num_transparent;230 }231 settings.CountryList[index].num_anonymous=parseInt(resp[i]['num_anonymous']);232 if(resp[i]['num_anonymous']!="None"){233 settings.CountryList[0].num_anonymous=settings.CountryList[0].num_anonymous+settings.CountryList[index].num_anonymous;234 }235 settings.CountryList[index].num_elite=parseInt(resp[i]['num_elite']);236 if(resp[i]['num_elite']!="None"){237 settings.CountryList[0].num_elite=settings.CountryList[0].num_elite+settings.CountryList[index].num_elite;238 }239 settings.CountryList[index].num_any=parseInt(resp[i]['num_any']);240 if(resp[i]['num_any']!="None"){241 settings.CountryList[0].num_any=settings.CountryList[0].num_any+settings.CountryList[index].num_any;242 }243 settings.activeCountryList.push(settings.CountryList[index]);244 }245 updateCountryList();246 247 }248 249 }250 xhr.send();251 },252 253 initial_test=function(){254 settings.selection_timeout = 0255 var xhr_array = [];256 for (i=0; i<settings.num_proxy_http;i++){257 xhr_array[i] = new XMLHttpRequest();258 time_request=(new Date()).getTime();259 xhr_array[i].open("GET", settings.default_test_url+"?_time=" + time_request, true);260 xhr_array[i]._url=settings.default_test_url+"?_time=" + time_request ;261 xhr_array[i]._sent= (new Date).getTime()262 xhr_array[i]._id=i;263 ProxyList.proxyListHttp[i]['urls'].unshift(xhr_array[i]._url);264 updatePac();265 xhr_array[i].onreadystatechange = function(readystateEvent) {266 if (this.readyState == 4 && settings.selection_timeout>=0) {267 if (settings.debug == 1) { console.log("RECEIVED HELLO "+ this._url +" "+((new Date).getTime() - this._sent)+" "+ProxyList.proxyListHttp[this._id]['ip']) }268 269 ProxyList.proxyListHttp[this._id]['download_time']=((new Date).getTime() - this._sent)270 ProxyList.proxyListHttp[this._id]['download_items']=ProxyList.proxyListHttp[this._id]['download_items']+1271 ProxyList.proxyListHttp[this._id]['download_probe']=1272 ProxyList.proxyListHttp[this._id]['urls'].splice(ProxyList.proxyListHttp[this._id]['urls'].map(function(e) {return e}).indexOf(this._url),1);273 274 //set a timer to check the download time of all proxies in this probing phase. this is useful for strategy 1 only.275 if(settings.selection_timeout == 0 && settings.strategy==1){276 //for the moment wait twice the fastest proxy277 settings.selection_timeout = setTimeout(initial_sort, ProxyList.proxyListHttp[this._id]['download_time'])278 }279 280 281 282 }283 284 }285 286 287 xhr_array[i].send();288 }289 290 291 },292 293 initial_test_https=function(){294 if(settings.popup_page_loaded_once>0){295 updateCurrentMessage(1);296 }297 settings.messagetodisplay=1298 settings.selection_timeout_https = 0299 var xhr_array = [];300 for (i=0; i<settings.num_proxy_https;i++){301 xhr_array[i] = new XMLHttpRequest();302 time_request=(new Date()).getTime();303 xhr_array[i].open("GET", settings.default_test_url+"?_time=" + time_request, true);304 xhr_array[i]._url=settings.default_test_url+"?_time=" + time_request ;305 xhr_array[i]._sent= (new Date).getTime()306 xhr_array[i]._id=i;307 ProxyList.proxyListHttps[i]['urls'].unshift(xhr_array[i]._url);308 309 updatePac();310 xhr_array[i].onreadystatechange = function(readystateEvent) {311 if (this.readyState == 4 && settings.selection_timeout_https >= 0) {312 if (settings.debug == 1) { console.log("RECEIVED HELLO "+ this._url +" "+((new Date).getTime() - this._sent)+" "+ProxyList.proxyListHttps[this._id]['ip']) }313 314 ProxyList.proxyListHttps[this._id]['download_time']=((new Date).getTime() - this._sent)315 ProxyList.proxyListHttps[this._id]['download_items']=ProxyList.proxyListHttps[this._id]['download_items']+1316 ProxyList.proxyListHttps[this._id]['download_probe']=1317 ProxyList.proxyListHttps[this._id]['urls'].splice(ProxyList.proxyListHttps[this._id]['urls'].map(function(e) {return e}).indexOf(this._url),1);318 319 //set a timer to check the download time of all proxies in this probing phase. this is useful for strategy 1 only.320 if(settings.selection_timeout_https == 0 && settings.strategy==1){321 //for the moment wait twice the fastest proxy322 settings.selection_timeout_https = setTimeout(initial_sort_https, ProxyList.proxyListHttps[this._id]['download_time'])323 }324 325 }326 327 }328 xhr_array[i].send();329 }330 331 332 },333 334 335 336 initial_sort=function(){337 settings.selection_timeout=-1338 //useful for the strategy 1 only339 if (settings.debug == 1) { console.log("End of proxy probing")}340 341 i=settings.num_proxy_http-1;342 343 //remove the proxy that have not provided the probe page yet344 while(i>=0){345 ProxyList.proxyListHttp[i]['urls']=[]346 if(ProxyList.proxyListHttp[i]['download_probe']==0){347 ProxyList.proxyListHttp[i]['download_probe']=0348 ProxyList.proxyListHttp.splice(i,1);349 settings.num_proxy_http=settings.num_proxy_http-1350 }else{351 ProxyList.proxyListHttp[i]['download_probe']=0352 }353 i=i-1;354 }355 356 for(i=0; i<ProxyList.proxyListHttp.length;i++){357 ProxyList.proxyListHttp[i]['urls']==[];358 }359 360 361 ProxyList.default_proxy=ProxyList.proxyListHttp[0];362 updatePac();363 364 365 //for the second strategy the plugin is initialized at this point.366 settings.init=1367 if(settings.messagetodisplay==2){368 if(settings.popup_page_loaded_once>0){369 updateCurrentMessage(2);370 }371 settings.messagetodisplay=2;}372 else{373 if(settings.popup_page_loaded_once>0){374 updateCurrentMessage(1);375 }376 settings.messagetodisplay=1;377 }378 379 updateIcons();380 if (settings.debug == 1) { console.log(ProxyList.proxyListHttp)}381 },382 383 initial_sort_https=function(){384 settings.selection_timeout_https=-1385 //useful for the strategy 1 only386 if (settings.debug == 1) { console.log("End of proxy probing")}387 388 389 i=settings.num_proxy_https-1;390 391 //remove the proxy that have not provided the probe page yet392 while(i>=0){393 ProxyList.proxyListHttps[i]['urls']=[]394 if(ProxyList.proxyListHttps[i]['download_probe']==0){395 ProxyList.proxyListHttps[i]['download_probe']=0396 ProxyList.proxyListHttps.splice(i,1);397 settings.num_proxy_https=settings.num_proxy_https-1398 }else{399 ProxyList.proxyListHttps[i]['download_probe']=0400 }401 i=i-1;402 }403 404 for(i=0; i<ProxyList.proxyListHttps.length;i++){405 ProxyList.proxyListHttps[i]['urls']==[];406 }407 408 settings.num_proxy_https=ProxyList.proxyListHttps.length;409 ProxyList.proxyListHttps[0]['urls']=["https://*"];410 411 updatePac();412 413 if(settings.popup_page_loaded_once>0){414 updateCurrentMessage(2);415 }416 settings.messagetodisplay=2417 418 419 },420 421 change_proxy=function(){422 chrome.tabs.query({"active": true,"lastFocusedWindow": true}, function (tabs) {423 if(tabs[0].url.match("https") ){424 change_proxy_https();425 }else{426 change_proxy_http();427 }428 })429 430 431 },432 433 change_proxy_http=function(){434 settings.init=2435 updateIcons();436 if(settings.popup_page_loaded_once>0){437 updateCurrentMessage(background.settings.messagetodisplay);438 }439 440 clearTimeout(exploration_timeout)441 clearTimeout(exploitation_timeout)442 443 exploration_timeout=0444 exploitation_timeout=0445 446 447 //TODO for strategy 0: remove the n proxy used (code still experimental not committed)448 449 if(settings.strategy==1){450 451 //check if you still have tested proxy452 if(settings.num_proxy_http-1>0)453 {454 settings.init=1455 settings.num_proxy_http_full=settings.num_proxy_http_full-1456 settings.num_proxy_http=settings.num_proxy_http-1457 458 459 proxy_index=ProxyList.fullProxyListHttp.map(function(e) {return e['name']}).indexOf(ProxyList.default_proxy['name']);460 ProxyList.fullProxyListHttp.splice(proxy_index,1);461 462 ProxyList.proxyListHttp.splice(0,1);463 ProxyList.default_proxy=ProxyList.proxyListHttp[0];464 465 updatePac();466 setTimeout(updateIcons, 1000) //need timer to deal with asynchronous behaviur :(467 if(settings.popup_page_loaded_once>0){468 setTimeout(updateCurrentMessage, 1050, background.settings.messagetodisplay)469 }470 471 }472 else{473 if(settings.num_proxy_http_full-1>0){474 settings.num_proxy_http_full=settings.num_proxy_http_full-1475 settings.num_proxy_http=settings.num_proxy_http-1476 477 478 proxy_index=ProxyList.fullProxyListHttp.map(function(e) {return e['name']}).indexOf(ProxyList.default_proxy['name']);479 ProxyList.fullProxyListHttp.splice(proxy_index,1);480 481 ProxyList.proxyListHttp.splice(0,1);482 settings.init=2;483 updateIcons();484 settings.num_proxy_http=Math.min(settings.max_num_proxy,settings.num_proxy_http_full);485 ProxyList.proxyListHttp=ProxyList.fullProxyListHttp.slice(0,settings.num_proxy_http); 486 ProxyList.default_proxy=ProxyList.proxyListHttp[0];487 initial_test();488 updateIcons();489 if(settings.popup_page_loaded_once>0){490 setTimeout(updateCurrentMessage, 1050, background.settings.messagetodisplay)491 }492 } 493 else{494 stop();495 init();496 }497 }498 }499 500 }, 501 502 change_proxy_https=function(){503 settings.init=2504 updateIcons();505 if(settings.popup_page_loaded_once>0){506 updateCurrentMessage(background.settings.messagetodisplay)507 }508 clearTimeout(exploration_timeout)509 clearTimeout(exploitation_timeout)510 511 exploration_timeout=0512 exploitation_timeout=0513 514 515 //TODO for strategy 0: remove the n proxy used (code still experimental not committed)516 517 if(settings.strategy==1){518 519 //check if you still have tested proxy520 if(settings.num_proxy_https-1>0)521 {522 settings.num_proxy_https_full=settings.num_proxy_https_full-1523 settings.num_proxy_https=settings.num_proxy_https-1524 525 526 proxy_index=ProxyList.fullProxyListHttps.map(function(e) {return e['name']}).indexOf(ProxyList.proxyListHttps[0]['name']);527 ProxyList.fullProxyListHttps.splice(proxy_index,1);528 529 ProxyList.proxyListHttps.splice(0,1);530 531 ProxyList.proxyListHttps[0]['urls']=["https://*"];532 533 updatePac();534 535 }536 else{537 538 if(settings.num_proxy_https_full-1>0){539 settings.num_proxy_https_full=settings.num_proxy_https_full-1540 settings.num_proxy_https=settings.num_proxy_https-1541 542 543 proxy_index=ProxyList.fullProxyListHttps.map(function(e) {return e['name']}).indexOf(ProxyList.proxyListHttps[0]['name']);544 ProxyList.fullProxyListHttps.splice(proxy_index,1);545 546 ProxyList.proxyListHttps.splice(0,1);547 settings.num_proxy_https=Math.min(settings.max_num_proxy,settings.num_proxy_https_full);548 ProxyList.proxyListHttps=ProxyList.fullProxyListHttps.slice(0,settings.num_proxy_https); 549 550 initial_test_https();551 } 552 else{553 fetch_https_proxies();554 }555 }556 }557 settings.init=1558 setTimeout(updateIcons, 1000) //need timer to deal with asynchronous behaviur :(559 if(settings.popup_page_loaded_once>0){560 setTimeout(updateCurrentMessage, 1050, background.settings.messagetodisplay)561 }562 }, 563 564 565 fetch_https_proxies=function(){ 566 567 ProxyList.fullProxyListHttps=[];568 settings.num_proxy_https_full=0569 //build the query url570 settings.query_url=settings.default_query_url;571 572 if(settings.anonimity=="anonymous"){573 settings.query_url=settings.query_url+"?strategy=7";574 }575 else {576 if(settings.anonimity=="elite")577 {578 settings.query_url=settings.query_url+"?strategy=8";579 }580 else{581 if(settings.anonimity=="transparent")582 {583 settings.query_url=settings.query_url+"?strategy=9";584 }585 else{586 settings.query_url=settings.query_url+"?strategy=6";587 }588 }589 }590 591 592 if(settings.region!=""){593 settings.query_url=settings.query_url+"&region="+settings.region;594 }595 596 settings.query_url=settings.query_url+"&protocol=https";597 settings.query_url=settings.query_url+"&version="+settings.version+"&enabled_id="+settings.enabled_id+"&session_id="+settings.session_id;598 599 //contact DB server and pull proxies at the beginning of the list 600 var xhr = new XMLHttpRequest();601 xhr.open("GET", settings.query_url, true);602 xhr.onreadystatechange = function() {603 if (this.readyState == 4 && this.status==200) {604 var resp = JSON.parse(xhr.responseText)605 for (var i in resp){606 settings.num_proxy_https_full=settings.num_proxy_https_full+1;607 ProxyList.fullProxyListHttps.push(new Proxy("https"+i,"https"+resp[i]['ip']+":"+resp[i]['port'],resp[i]['ip'],resp[i]['port'],100000,0,0,0,0,0,[]));608 609 if (settings.debug == 1) { console.log("proxy is "+resp[i]['ip']);}610 if (settings.debug == 1) { console.log(ProxyList.proxyListHttps)}611 612 613 }614 615 settings.num_proxy_https=Math.min(settings.max_num_proxy,settings.num_proxy_https_full);616 ProxyList.proxyListHttps=ProxyList.fullProxyListHttps.slice(0,settings.num_proxy_https);617 618 if(settings.num_proxy_https>0){619 620 if (settings.debug == 1) { console.log("defaul proxy is "+resp[0]['ip']);}621 if (settings.debug == 1) { console.log(ProxyList.proxyListHttps)}622 623 624 updatePac();625 initial_test_https();626 }627 628 }629 630 631 }632 xhr.send();633 }, 634 635 stop = function(){636 //plugin not initialized637 settings.init=0638 settings.num_proxy_http=0;639 settings.num_proxy_http_full=0;640 settings.num_proxy_https=0;641 settings.num_proxy_https_full=0;642 updateIcons();643 settings.messagetodisplay=0;644 if(settings.popup_page_loaded_once>0){645 updateCurrentMessage(0);646 }647 648 if (settings.debug == 1) { console.log("STOPPING") }649 650 651 clearTimeout(exploration_timeout)652 clearTimeout(exploitation_timeout)653 exploration_timeout=0654 exploitation_timeout=0655 settings.session_id=0;656 657 ProxyList.proxyListHttp = [];658 ProxyList.proxyListHttps = [];659 ProxyList.proxyFilterList = [];660 ProxyList.fullProxyListHttp = [];661 ProxyList.fullProxyListHttps = [];662 663 ProxyList.default_proxy = null;664 defaultSystemProxySetting();665 666 for(i in Statistics.TabStats_list){667 Statistics.TabStats_list[i]['end_time']=(new Date).getTime()668 Statistics.statsList[Statistics.num_stats]=Statistics.TabStats_list[i];669 Statistics.num_stats=Statistics.num_stats+1;670 }671 Statistics.TabStats_list=[];672 673 if(Statistics.num_stats>0 && settings.experiments==0){674 report_stats();675 }676 677 },678 679 getHttpProxy = function() {680 return ProxyList.default_proxy.ip + ':' + ProxyList.default_proxy.port;681 },682 683 getHttpsProxy = function() {684 return ProxyList.proxyListHttps[0]['ip']+":"+ProxyList.proxyListHttps[0]['port'];685 },686 687report_stats = function() {688 data = JSON.stringify(Statistics.statsList)689 request= new XMLHttpRequest()690 request.open("POST", settings.default_post_url+"?version="+settings.version, true)691 request.setRequestHeader("Content-type", "application/json")692 request.send(data)693 if (settings.debug == 1) {694 console.log(data)695 }696 request.onreadystatechange = function() {697 if (this.readyState == 4) {698 if (settings.debug == 1) {699 console.log(request.responseText)700 }701 }702 }703 Statistics.num_stats=0;704 Statistics.statsList=[];705 },706 707 708 709 OnTimerExpired = function(requestId,url,tab_id){710 711 if (settings.enabled && url!=settings.query_url && ! url.match("hello") && settings.init==1){ 712 713 if (settings.debug == 1) { console.log("ALARM!! " + requestId + " "+ url+" "+tab_id)}714 request_index=requests.map(function(e) {return e['requestId']}).indexOf(requestId);715 proxy_id=requests[request_index]['proxy_id']716 proxy_index=ProxyList.proxyListHttp.map(function(e) {return e['id']}).indexOf(proxy_id)717 ProxyList.proxyListHttp[proxy_index]['urls'].splice(ProxyList.proxyListHttp[proxy_index]['urls'].map(function(e) {return e}).indexOf(url),1);718 ProxyList.proxyListHttp[proxy_index]['timeouts']=ProxyList.proxyListHttp[proxy_index]['timeouts']+1719 720 requests.splice(request_index,1);721 if(settings.strategy==0){722 updatePac();723 }724 725 if(titles[tab_id]==url){726 if(settings.start_event[tab_id]!=-1 && settings.experiments==1 && settings.reload==1){727 setTimeout(Reload,1000,tab_id)728 }729 }730 else{731 chrome.tabs.executeScript(tab_id, {file:'jquery-2.0.3.min.js'});732 chrome.tabs.executeScript(tab_id, 733 {code: "console.log('"+url+"'); var x=$(\"*\").map(function(){ if($(this).prop('src')=='"+url+"'){ $(this).load('"+url+"'); return $(this).get(0);} else if ($(this).prop('href')) if($(this).prop('href').indexOf('"+url+"')>-1) { $(this).load('"+url+"'); return $(this).get(0);} }); console.log((x)); $(x).length",734 runAt: "document_idle"},735 function (result) {736 if (settings.debug == 1) { console.log("executed " +url+ " "+ result[0])}737 738 }); 739 }740 }741 },742 743 744 745 OnExplorationTimerExpired = function(){746 if (settings.debug == 1) { console.log("EXPLORATION TIMEOUT")}747 exploitation_timeout=setTimeout(OnExploitationTimerExpired, settings.exploitation_timer)748 exploration_timeout=0749 //exploration_timeout=setTimeout(OnExplorationTimerExpired, settings.exploration_timer)750 settings.currently_active=1751 settings.init=0752 753 754 ProxyList.proxyListHttp.sort(function(a, b) {755 if(a['download_items']==b['download_items']){756 if(a['download_time'] <= b['download_time'])757 return -1758 else759 return 1760 }else{761 if(a['download_items']>=b['download_items'])762 return -1763 else764 return 1765 }766 767 });768 769 770 771 772 if (settings.debug == 1) { console.log("ORDERED")}773 if (settings.debug == 1) { console.log(ProxyList.proxyListHttp)}774 if (settings.debug == 1) { console.log(ProxyList.proxyListHttp[0])}775 settings.init=1776 },777 778 OnExploitationTimerExpired = function(){779 if (settings.debug == 1) { console.log("EXPLOITATION TIMEOUT")}780 exploration_timeout=setTimeout(OnExplorationTimerExpired, settings.exploration_timer)781 settings.currently_active=settings.num_proxy_http782 ProxyList.flag=Math.floor((Math.random() * settings.currently_active) ); 783 if (settings.debug == 1) { console.log(" FLAG "+ProxyList.flag)}784 for (i=0; i<settings.num_proxy_http;i++){785 ProxyList.proxyListHttp[i]['download_time']=100000;786 ProxyList.proxyListHttp[i]['download_items']=0;787 }788 exploitation_timeout=0 789 }790 791 Reload=function(tabId){792 if(settings.start_event[tabId]!=-1){793 chrome.tabs.reload(tabId);794 }795 }796 797 ;798chrome.webRequest.onBeforeRequest.addListener(799 function(details) {800 //for all request we can potentially change the proxy801if (settings.enabled && details.url!=settings.query_url && settings.init==1 && details.url.indexOf("isthatfreeproxysafe.com/test/hello")==-1){ 802 //select the proxy to use. If strategy 0 it is random over the active ones. otherwise it is the first which is now also the defaul one.803 proxy_index=ProxyList.flag804 ProxyList.flag=(ProxyList.flag+1)%settings.currently_active;805 806 ProxyList.proxyListHttp[proxy_index]['urls'].unshift(details.url)807 ProxyList.proxyListHttp[proxy_index]['requests']=ProxyList.proxyListHttp[proxy_index]['requests']+1808 if (settings.debug == 1) { console.log("REQUEST "+details.url+" proxy "+ProxyList.proxyListHttp[proxy_index]['ip']+" flag "+ProxyList.flag+" ID "+ ProxyList.proxyListHttp[proxy_index]['id']+ " requests " + ProxyList.proxyListHttp[proxy_index]['requests'])}809 810 if(settings.retransmissions==1){811 tmp_timeout=setTimeout(OnTimerExpired, settings.request_timer, details.requestId, details.url,details.tabId)812 }813 else{814 tmp_timeout=0815 }816 requests.push(new Requestentry(proxy_index, ProxyList.proxyListHttp[proxy_index]['id'],tmp_timeout,(new Date).getTime(),details.url,details.requestId,0));817 818 if(settings.strategy==0){ 819 updatePac();820 }821 822 } 823},824 825{urls: ["<all_urls>"]}, ["blocking"]);826chrome.webRequest.onHeadersReceived.addListener(827 function(details) {828 //remove pattern from proxy once receive the first headers829 if (settings.enabled && details.url!=settings.query_url && settings.init==1 && details.url.indexOf("isthatfreeproxysafe.com/test/hello")==-1){ 830 831 Statistics.TabStats_list[details.tabId]['num_objects_requested']=Statistics.TabStats_list[details.tabId]['num_objects_requested']+1;832 if(details.url.match("https")){833 Statistics.TabStats_list[details.tabId]['num_objects_requested_https']=Statistics.TabStats_list[details.tabId]['num_objects_requested_https']+1;834 }835 836 request_index=requests.map(function(e) {return e['requestId']}).indexOf(details.requestId);837 if(request_index>=0){838 proxy_id=requests[request_index]['proxy_id']839 proxy_index=ProxyList.proxyListHttp.map(function(e) {return e['id']}).indexOf(proxy_id)840 ProxyList.proxyListHttp[proxy_index]['urls'].splice(ProxyList.proxyListHttp[proxy_index]['urls'].map(function(e) {return e}).indexOf(details.url),1);841 clearTimeout(requests[request_index]['timeout']);842 ProxyList.proxyListHttp[proxy_index]['download_items']=ProxyList.proxyListHttp[proxy_index]['download_items']+1843 844 if (ProxyList.proxyListHttp[proxy_index]['download_time']==100000){845 ProxyList.proxyListHttp[proxy_index]['download_time']=((new Date).getTime()-requests[request_index]['request_time']);846 }847 else{848 ProxyList.proxyListHttp[proxy_index]['download_time']=settings.alpha*ProxyList.proxyListHttp[proxy_index]['download_time']+(1-settings.alpha)*((new Date).getTime()-requests[request_index]['request_time']);849 }850 851 if (settings.debug == 1) { console.log("Proxy ID"+ requests[request_index]['proxy'] + " ip "+ ProxyList.proxyListHttp[proxy_index]['ip'] + " Download time "+ ProxyList.proxyListHttp[proxy_index]['download_time']+" timeouts "+ProxyList.proxyListHttp[proxy_index]['timeouts'] + " errors "+ ProxyList.proxyListHttp[proxy_index]['errors'])}852 if (settings.debug == 1) { console.log(details)}853 requests.splice(request_index,1);854 }855 856 857 858 }859 }860 861 ,{urls: ["<all_urls>"]},["responseHeaders","blocking"]);862chrome.webRequest.onCompleted.addListener( 863 864 function(details) {865 if(details.responseHeaders.find(function(e) {return (e.name=="content-length" || e.name=="Content-Length")}) && details.fromCache==false && settings.init==1 && details.tabId>=0){866 settings.data_downloaded[details.tabId]=settings.data_downloaded[details.tabId]+parseInt(details.responseHeaders.find(function(e) {return (e.name=="content-length" || e.name=="Content-Length")}).value);867 Statistics.TabStats_list[details.tabId]['data_downloaded']=Statistics.TabStats_list[details.tabId]['data_downloaded']+parseInt(details.responseHeaders.find(function(e) {return (e.name=="content-length" || e.name=="Content-Length")}).value);868 Statistics.TabStats_list[details.tabId]['time_last_data_downloaded']=details.timeStamp;869 if(details.url.match("https")){870 Statistics.TabStats_list[details.tabId]['data_downloaded_https']=Statistics.TabStats_list[details.tabId]['data_downloaded_https']+parseInt(details.responseHeaders.find(function(e) {return (e.name=="content-length" || e.name=="Content-Length")}).value); 871 }872 }873 if(details.fromCache==false && settings.init==1 &&details.tabId>=0){874 Statistics.TabStats_list[details.tabId]['num_objects']=Statistics.TabStats_list[details.tabId]['num_objects']+1875 if(details.url.match("https")){876 Statistics.TabStats_list[details.tabId]['num_objects_https']=Statistics.TabStats_list[details.tabId]['num_objects_https']+1877 }878 }879},880{urls: ["<all_urls>"]},["responseHeaders"]);881chrome.webRequest.onErrorOccurred.addListener(882 function(details) {883 if (settings.enabled && details.url!=settings.query_url && ! details.url.match("hello") && settings.init==1){ 884 885 886 if (settings.debug == 1) { console.log("ERROR_OCCURRED")}887 if (settings.debug == 1) { console.log(details)}888 889 request_index=requests.map(function(e) {return e['requestId']}).indexOf(details.requestId);890 proxy_id=requests[request_index]['proxy_id']891 proxy_index=ProxyList.proxyListHttp.map(function(e) {return e['id']}).indexOf(proxy_id)892 ProxyList.proxyListHttp[proxy_index]['urls'].splice(ProxyList.proxyListHttp[proxy_index]['urls'].map(function(e) {return e}).indexOf(details.url),1);893 clearTimeout(requests[request_index]['timeout']);894 ProxyList.proxyListHttp[proxy_index]['errors']=ProxyList.proxyListHttp[proxy_index]['errors']+1895 requests.splice(request_index,1);896 if(settings.strategy==0){ 897 updatePac();898 }899 900 901 if(settings.retransmissions==1){902 if(titles[details.tabId]==details.url){903 if(settings.start_event[details.tabId]!=-1 && settings.experiments==1 && settings.reload==1){904 setTimeout(Reload,1000,details.tabId)905 }906 }907 else{908 chrome.tabs.executeScript(details.tab_id, {file:'jquery-2.0.3.min.js'});909 chrome.tabs.executeScript(details.tab_id, 910 {code: "console.log('"+details.url+"'); var x=$(\"*\").map(function(){ if($(this).prop('src')=='"+details.url+"'){ $(this).load('"+details.url+"'); return $(this).get(0);} else if ($(this).prop('href')) if($(this).prop('href').indexOf('"+details.url+"')>-1) { $(this).load('"+details.url+"'); return $(this).get(0);} }); console.log((x)); $(x).length",911 runAt: "document_idle"},912 function (result) {913 if (settings.debug == 1) { console.log("executed "+ result[0])}914 });915 } 916 }917 }918 }919 ,{urls: ["<all_urls>"]});920chrome.webNavigation.onBeforeNavigate.addListener(function(details) {921 if(details.frameId==0 && settings.enabled && settings.init==1){922 if (settings.debug == 1) { console.log("NAVIGATION STARTED EVENT "+ details.tabId+details.url+details.frameId)}923 924 //finish and move old data925 if(Statistics.TabStats_list[details.tabId]){926 Statistics.TabStats_list[details.tabId]['end_time']=details.timeStamp;927 Statistics.statsList[Statistics.num_stats]=Statistics.TabStats_list[details.tabId];928 Statistics.TabStats_list[details.tabId]=null;929 Statistics.num_stats=Statistics.num_stats+1;930 if(Statistics.num_stats>=settings.push_stats_after && settings.experiments==0){931 report_stats();932 }933 }934 935 if(details.url.match("https"))936 {937 protocol="https";938 }939 else940 {941 protocol="http";942 }943 944 if(settings.num_proxy_https>0){945 Statistics.TabStats_list[details.tabId]=new TabStats(settings.session_id,settings.enabled_id,details.timeStamp,0,0,protocol,0,0,0,0,0,0,0,0,0,0,0,0,0,false,0,"",ProxyList.default_proxy['ip']+":"+ProxyList.default_proxy['port'],ProxyList.proxyListHttps[0]['ip']+":"+ProxyList.proxyListHttps[0]['port']);946 }947 else{948 Statistics.TabStats_list[details.tabId]=new TabStats(settings.session_id,settings.enabled_id,details.timeStamp,0,0,protocol,0,0,0,0,0,0,0,0,0,0,0,0,0,false,0,"",ProxyList.default_proxy['ip']+":"+ProxyList.default_proxy['port'],"");949 }950 }951});952chrome.webNavigation.onCompleted.addListener(function(details) {953 if(details.frameId==0 && settings.enabled && settings.init==1 && Statistics.TabStats_list[details.tabId]){954 //add entry to statistics 955 Statistics.TabStats_list[details.tabId]['data_downloaded_at_onload']=Statistics.TabStats_list[details.tabId]['data_downloaded'];956 Statistics.TabStats_list[details.tabId]['data_downloaded_https_at_onload']=Statistics.TabStats_list[details.tabId]['data_downloaded_https'];957 Statistics.TabStats_list[details.tabId]['num_objects_requested_at_onload']=Statistics.TabStats_list[details.tabId]['num_objects_requested'];958 Statistics.TabStats_list[details.tabId]['num_objects_requested_https_at_onload']=Statistics.TabStats_list[details.tabId]['num_objects_requested_https'];959 Statistics.TabStats_list[details.tabId]['data_downloaded_https_at_onload']=Statistics.TabStats_list[details.tabId]['data_downloaded_https'];960 Statistics.TabStats_list[details.tabId]['onload']=details.timeStamp-Statistics.TabStats_list[details.tabId]['start'];961 Statistics.TabStats_list[details.tabId]['onload_event']=true;962 Statistics.TabStats_list[details.tabId]['num_objects_at_onload']=Statistics.TabStats_list[details.tabId]['num_objects'];963 Statistics.TabStats_list[details.tabId]['num_objects_https_at_onload']=Statistics.TabStats_list[details.tabId]['num_objects_https'];964 965 if (settings.debug == 1) { console.log(end_download + " COMPLETED EVENT "+ delta +" from first "+delta_init)}966 967 968 }969});970chrome.webNavigation.onErrorOccurred.addListener(function(details) {971 if (settings.debug == 1) { console.log("ERROR AND STOP")}972 if(details.frameId==0 && settings.enabled && settings.init==1 && Statistics.TabStats_list[details.tabId]){973 974 Statistics.TabStats_list[details.tabId]['data_downloaded_at_onload']=Statistics.TabStats_list[details.tabId]['data_downloaded']975 Statistics.TabStats_list[details.tabId]['num_objects_at_onload']=Statistics.TabStats_list[details.tabId]['num_objects'];976 Statistics.TabStats_list[details.tabId]['data_downloaded_https_at_onload']=Statistics.TabStats_list[details.tabId]['data_downloaded_https'];977 Statistics.TabStats_list[details.tabId]['num_objects_requested_at_onload']=Statistics.TabStats_list[details.tabId]['num_objects_requested'];978 Statistics.TabStats_list[details.tabId]['num_objects_requested_https_at_onload']=Statistics.TabStats_list[details.tabId]['num_objects_requested_https'];979 Statistics.TabStats_list[details.tabId]['data_downloaded_https_at_onload']=Statistics.TabStats_list[details.tabId]['data_downloaded_https'];980 Statistics.TabStats_list[details.tabId]['num_objects_at_onload']=Statistics.TabStats_list[details.tabId]['num_objects'];981 Statistics.TabStats_list[details.tabId]['num_objects_https_at_onload']=Statistics.TabStats_list[details.tabId]['num_objects_https'];982 Statistics.TabStats_list[details.tabId]['error_time']=details.timeStamp-Statistics.TabStats_list[details.tabId]['start'];983 Statistics.TabStats_list[details.tabId]['onload_event']=false;984 Statistics.TabStats_list[details.tabId]['error']=details.error;985 986 987 }988 989 990 991 if(settings.start_event[details.tabId]!=-1 && settings.experiments==1){992 if(settings.strategy==0){ 993 clearTimeout(exploration_timeout);994 clearTimeout(exploitation_timeout);995 OnExploitationTimerExpired();996 }997 if(settings.reload==1 && settings.experiments==1){998 setTimeout(Reload,1000,details.tabId)999 }1000 }1001});1002chrome.tabs.onRemoved.addListener(function(tabId,removeInfo) {1003 if(Statistics.TabStats_list[tabId] && settings.enabled && settings.init==1){1004 Statistics.TabStats_list[tabId]['end_time']=(new Date).getTime()1005 Statistics.statsList[Statistics.num_stats]=Statistics.TabStats_list[tabId];1006 Statistics.TabStats_list.splice([tabId],1)1007 Statistics.num_stats=Statistics.num_stats+1;1008 1009 1010 if(Statistics.num_stats>=settings.push_stats_after && settings.experiments==0){1011 report_stats();1012 }1013 }1014 1015});1016chrome.tabs.onReplaced.addListener(function(addedTabId, removedTabId) {1017 tabId=removedTabId;1018 if(Statistics.TabStats_list[tabId] && settings.enabled && settings.init==1){1019 Statistics.TabStats_list[tabId]['end_time']=(new Date).getTime()1020 Statistics.statsList[Statistics.num_stats]=Statistics.TabStats_list[tabId];1021 Statistics.TabStats_list.splice([tabId],1)1022 Statistics.num_stats=Statistics.num_stats+1;1023 1024 1025 if(Statistics.num_stats>=settings.push_stats_after && settings.experiments==0){1026 report_stats();1027 }1028 }1029 1030});1031chrome.runtime.onStartup.addListener(function() {1032 1033 //For testing purposes initialize as follow1034 if (settings.experiments==0){1035 chrome.storage.sync.get(["enabled","anonimity","region"], function (obj) {1036 settings.enabled=obj.enabled;1037 settings.anonimity=obj.anonimity;1038 settings.region=obj.region;1039 if(settings.enabled==true){1040 stop();1041 //loadHandler();1042 init(); 1043 settings.current_region=settings.region;1044 settings.current_anonimity=settings.anonimity;1045 1046 }else{1047 stop();1048 }1049 1050 });1051 }else{1052 if (settings.debug == 1) { console.log("STARTUP")}1053 stop();1054 init();1055 settings.enabled=true;1056 }1057 });1058chrome.runtime.onSuspend.addListener(function() {1059 for(i in Statistics.TabStats_list){1060 Statistics.TabStats_list[i]['end_time']=(new Date).getTime()1061 Statistics.statsList[Statistics.num_stats]=Statistics.TabStats_list[i];1062 Statistics.num_stats=Statistics.num_stats+1;1063 }1064 Statistics.TabStats_list=[];1065 1066 if(Statistics.num_stats>0 && settings.experiments==0){1067 report_stats();1068 }...

Full Screen

Full Screen

eval-stack-trace.js

Source:eval-stack-trace.js Github

copy

Full Screen

1// Copyright 2012 the V8 project authors. All rights reserved.2// Redistribution and use in source and binary forms, with or without3// modification, are permitted provided that the following conditions are4// met:5//6// * Redistributions of source code must retain the above copyright7// notice, this list of conditions and the following disclaimer.8// * Redistributions in binary form must reproduce the above9// copyright notice, this list of conditions and the following10// disclaimer in the documentation and/or other materials provided11// with the distribution.12// * Neither the name of Google Inc. nor the names of its13// contributors may be used to endorse or promote products derived14// from this software without specific prior written permission.15//16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT20// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.27// Return the stack frames of an Error object.28Error.prepareStackTrace = function(error, frames) {29 return frames;30}31Error.prototype.getFrames = function() {32 var frames = this.stack;33 return frames;34}35String.prototype.contains = function(pattern) {36 return this.indexOf(pattern) > -1;37}38// Check for every frame that a certain method returns the39// expected value for every frame.40Array.prototype.verifyEquals = function(frames, func_name) {41 this.forEach(42 function(element, index) {43 var frame = frames[index];44 if (element === null) return;45 assertEquals(element, (frame[func_name])());46 }47 );48}49// Check for every frame that a certain method has a return value50// that contains the expected pattern for every frame.51Array.prototype.verifyContains = function(frames, func_name) {52 this.forEach(53 function(element, index) {54 var frame = frames[index];55 if (element === null) return;56 assertTrue((frame[func_name])().contains(element));57 }58 );59}60// Check for every frame that a certain method returns undefined61// when expected.62Array.prototype.verifyUndefined = function(frames, func_name) {63 this.forEach(64 function(element, index) {65 var frame = frames[index];66 if (element === null) return;67 assertEquals(element, (frame[func_name])() === undefined);68 }69 );70}71// Simple eval.72var code1 = "function f() { \n" +73 " throw new Error(3); \n" + // Line 274 "} \n" +75 "f(); \n"; // Line 476function g() {77 eval(code1);78}79try {80 g();81} catch (e) {82 // We expect something like83 // f (eval at g (eval-stack.js:87:8), <anonymous>:2:9)84 // eval (eval at g (eval-stack.js:87:8), <anonymous>:4:1)85 // g (eval-stack.js:87:3)86 // eval-stack.js:94:387 var frames = e.getFrames();88 assertEquals(4, frames.length);89 ["f", "eval", "g"]90 .verifyEquals(frames, "getFunctionName");91 [2, 4]92 .verifyEquals(frames, "getLineNumber");93 ["<anonymous>:2:", "<anonymous>:4:"]94 .verifyContains(frames, "toString");95 [true, true, false, false]96 .verifyUndefined(frames, "getFileName");97 ["eval at g", "eval at g"]98 .verifyContains(frames, "getEvalOrigin");99}100// Nested eval.101var code2 = "function h() { \n" +102 " // Empty \n" +103 " eval(code1); \n" + // Line 3104 "} \n" +105 "h(); \n"; // Line 5106try {107 eval(code2);108} catch (e) {109 // We expect something like110 // f (eval at h (eval at <anonymous> (eval-stack.js:116:8)),111 // <anonymous>:2:9)112 // eval (eval at h (eval at <anonymous> (eval-stack.js:116:8)),113 // <anonymous>:4:1)114 // h (eval at <anonymous> (eval-stack.js:116:8), <anonymous>:3:3)115 // eval (eval at <anonymous> (eval-stack.js:116:8), <anonymous>:5:1)116 // eval-stack.js:116:3117 var frames = e.getFrames();118 assertEquals(5, frames.length);119 ["f", "eval", "h", "eval"]120 .verifyEquals(frames, "getFunctionName");121 [2, 4, 3, 5]122 .verifyEquals(frames, "getLineNumber");123 ["<anonymous>:2:", "<anonymous>:4:", "<anonymous>:3:", "<anonymous>:5:"]124 .verifyContains(frames, "toString");125 [true, true, true, true, false]126 .verifyUndefined(frames, "getFileName");127 ["eval at h (eval at <anonymous> (",128 "eval at h (eval at <anonymous> (",129 "eval at <anonymous> (",130 "eval at <anonymous> ("]131 .verifyContains(frames, "getEvalOrigin");132}133// Nested eval calling through non-eval defined function.134var code3 = "function h() { \n" +135 " // Empty \n" +136 " g(); \n" + // Line 3137 "} \n" +138 "h(); \n"; // Line 5139try {140 eval(code3);141} catch (e) {142 // We expect something like143 // f (eval at g (test.js:83:8), <anonymous>:2:9)144 // eval (eval at g (test.js:83:8), <anonymous>:4:1)145 // g (test.js:83:3)146 // h (eval at <anonymous> (test.js:149:8), <anonymous>:3:3)147 // eval (eval at <anonymous> (test.js:149:8), <anonymous>:5:1)148 // test.js:149:3149 var frames = e.getFrames();150 assertEquals(6, frames.length);151 ["f", "eval", "g", "h", "eval"]152 .verifyEquals(frames, "getFunctionName");153 [2, 4, null, 3, 5]154 .verifyEquals(frames, "getLineNumber");155 ["<anonymous>:2:", "<anonymous>:4:", null, "<anonymous>:3:", "<anonymous>:5:"]156 .verifyContains(frames, "toString");157 [true, true, false, true, true, false]158 .verifyUndefined(frames, "getFileName");159 ["eval at g (",160 "eval at g (",161 null,162 "eval at <anonymous> (",163 "eval at <anonymous> ("]164 .verifyContains(frames, "getEvalOrigin");165}166// Calling function defined in eval.167eval("function f() { \n" +168 " throw new Error(3); \n" +169 "} \n");170try {171 f();172} catch (e) {173 // We expect something like174 // f (eval at <anonymous> (test.js:182:40), <anonymous>:2:9)175 // test.js:186:3176 var frames = e.getFrames();177 assertEquals(2, frames.length);178 ["f"].verifyEquals(frames, "getFunctionName");179 [2].verifyEquals(frames, "getLineNumber");180 ["<anonymous>:2:"].verifyContains(frames, "toString");181 [true, false].verifyUndefined(frames, "getFileName");182 ["eval at <anonymous> ("].verifyContains(frames, "getEvalOrigin");...

Full Screen

Full Screen

articleData.ts

Source:articleData.ts Github

copy

Full Screen

1export const articleData = [2 { title: "제목1", content: "내용1", anonymous: true },3 { title: "제목2", content: "내용2", anonymous: false },4 { title: "제목3", content: "내용3", anonymous: true },5 { title: "제목4", content: "내용4", anonymous: false },6 { title: "제목5", content: "내용5", anonymous: true },7 { title: "제목6", content: "내용6", anonymous: false },8 { title: "제목7", content: "내용7", anonymous: true },9 { title: "제목8", content: "내용8", anonymous: false },10 { title: "제목9", content: "내용9", anonymous: true },11 { title: "제목10", content: "내용10", anonymous: false },12 { title: "제목11", content: "내용11", anonymous: true },13 { title: "제목12", content: "내용12", anonymous: false },14 { title: "제목13", content: "내용13", anonymous: true },15 { title: "제목14", content: "내용14", anonymous: false },16 { title: "제목15", content: "내용15", anonymous: true },17 { title: "제목16", content: "내용16", anonymous: false },18 { title: "제목17", content: "내용17", anonymous: true },19 { title: "제목18", content: "내용18", anonymous: false },20 { title: "제목19", content: "내용19", anonymous: true },21 { title: "제목20", content: "내용20", anonymous: false },22 { title: "제목21", content: "내용21", anonymous: true },23 { title: "제목22", content: "내용22", anonymous: false },24 { title: "제목23", content: "내용23", anonymous: true },25 { title: "제목24", content: "내용24", anonymous: false },26 { title: "제목25", content: "내용25", anonymous: true },27 { title: "제목26", content: "내용26", anonymous: false },28 { title: "제목27", content: "내용27", anonymous: true },29 { title: "제목28", content: "내용28", anonymous: false },30 { title: "제목29", content: "내용29", anonymous: true },31 { title: "제목30", content: "내용30", anonymous: false },32 { title: "제목31", content: "내용31", anonymous: true },33 { title: "제목32", content: "내용32", anonymous: false },34 { title: "제목33", content: "내용33", anonymous: true },35 { title: "제목34", content: "내용34", anonymous: false },36 { title: "제목35", content: "내용35", anonymous: true },37 { title: "제목36", content: "내용36", anonymous: false },38 { title: "제목37", content: "내용37", anonymous: true },39 { title: "제목38", content: "내용38", anonymous: false },40 { title: "제목39", content: "내용39", anonymous: true },41 { title: "제목40", content: "내용40", anonymous: false },42 { title: "제목41", content: "내용41", anonymous: true },43 { title: "제목42", content: "내용42", anonymous: false },44 { title: "제목43", content: "내용43", anonymous: true },45 { title: "제목44", content: "내용44", anonymous: false },46 { title: "제목45", content: "내용45", anonymous: true },47 { title: "제목46", content: "내용46", anonymous: false },48 { title: "제목47", content: "내용47", anonymous: true },49 { title: "제목48", content: "내용48", anonymous: false },50 { title: "제목49", content: "내용49", anonymous: true },51 { title: "제목50", content: "내용50", anonymous: false },52 { title: "제목51", content: "내용51", anonymous: true },53 { title: "제목52", content: "내용52", anonymous: false },54 { title: "제목53", content: "내용53", anonymous: true },55 { title: "제목54", content: "내용54", anonymous: false },56 { title: "제목55", content: "내용55", anonymous: true },57 { title: "제목56", content: "내용56", anonymous: false },58 { title: "제목57", content: "내용57", anonymous: true },59 { title: "제목58", content: "내용58", anonymous: false },60 { title: "제목59", content: "내용59", anonymous: true },61 { title: "제목60", content: "내용60", anonymous: false },62 { title: "제목61", content: "내용61", anonymous: true },63 { title: "제목62", content: "내용62", anonymous: false },64 { title: "제목63", content: "내용63", anonymous: true },65 { title: "제목64", content: "내용64", anonymous: false },66 { title: "제목65", content: "내용65", anonymous: true },67 { title: "제목66", content: "내용66", anonymous: false },68 { title: "제목67", content: "내용67", anonymous: true },69 { title: "제목68", content: "내용68", anonymous: false },70 { title: "제목69", content: "내용69", anonymous: true },71 { title: "제목70", content: "내용70", anonymous: false },72 { title: "제목71", content: "내용71", anonymous: true },73 { title: "제목72", content: "내용72", anonymous: false },74 { title: "제목73", content: "내용73", anonymous: true },75 { title: "제목74", content: "내용74", anonymous: false },76 { title: "제목75", content: "내용75", anonymous: true },77 { title: "제목76", content: "내용76", anonymous: false },78 { title: "제목77", content: "내용77", anonymous: true },79 { title: "제목78", content: "내용78", anonymous: false },80 { title: "제목79", content: "내용79", anonymous: true },81 { title: "제목80", content: "내용80", anonymous: false },82 { title: "제목81", content: "내용81", anonymous: true },...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var wpt = new WebPageTest('www.webpagetest.org');3 if (err) 4 return console.error(err);5 console.log('Test Results: '+data.response.data.testUrl);6 console.log('First View (i.e Load Time): '+data.response.data.average.firstView.loadTime);7 console.log('Repeat View (i.e Load Time): '+data.response.data.average.repeatView.loadTime);8});9var wpt = require('webpagetest');10var wpt = new WebPageTest('www.webpagetest.org');11 if (err) 12 return console.error(err);13 console.log('Test Results: '+data.response.data.testUrl);14 console.log('First View (i.e Load Time): '+data.response.data.average.firstView.loadTime);15 console.log('Repeat View (i.e Load Time): '+data.response.data.average.repeatView.loadTime);16});17var wpt = require('webpagetest');18var wpt = new WebPageTest('www.webpagetest.org');19 if (err) 20 return console.error(err);21 console.log('Test Results: '+data.response.data.testUrl);22 console.log('First View (i.e Load Time): '+data.response.data.average.firstView.loadTime);23 console.log('Repeat View (i.e Load Time): '+data.response.data.average.repeatView.loadTime);24});25var wpt = require('webpagetest');26var wpt = new WebPageTest('www.webpagetest.org');27 if (err) 28 return console.error(err);29 console.log('Test Results: '+data.response.data.testUrl);30 console.log('First View (i.e Load Time): '+data.response.data.average.firstView.loadTime);31 console.log('Repeat View (i.e Load Time): '+data.response.data.average.repeatView.loadTime);32});33var wpt = require('

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2 if (err) {3 console.log(err);4 } else {5 console.log(data);6 }7});8var wpt = require('webpagetest');9 if (err) {10 console.log(err);11 } else {12 console.log(data);13 }14});15var wpt = require('webpagetest');16 if (err) {17 console.log(err);18 } else {19 console.log(data);20 }21});22var wpt = require('webpagetest');23 if (err) {24 console.log(err);25 } else {26 console.log(data);27 }28});29var wpt = require('webpagetest');30 if (err) {31 console.log(err);32 } else {33 console.log(data);34 }35});36var wpt = require('webpagetest');37 if (err) {38 console.log(err);39 } else {40 console.log(data);41 }42});43var wpt = require('webpagetest');

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptools = require('wptools');2var wp = new wptools('Toronto');3wp.get(function(err, resp) {4 console.log(resp);5});6var wptools = require('wptools');7wptools.page('Toronto').get(function(err, resp) {8 console.log(resp);9});10The JSON object has multiple keys. The most important keys are:11The JSON object has multiple keys. The most important keys are:

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('webpagetest');2var client = wpt('www.webpagetest.org');3 if (err) return console.error(err);4 console.log(data);5});6var wpt = require('webpagetest');7var client = wpt('www.webpagetest.org');8 .then(function(data) {9 console.log(data);10 })11 .catch(function(err) {12 console.error(err);13 });14var wpt = require('webpagetest');15var client = wpt('www.webpagetest.org');16 .then(function(data) {17 console.log(data);18 client.getTestResults(data.data.testId, function(err, data) {19 if (err) return console.error(err);20 console.log(data);21 });22 })23 .catch(function(err) {24 console.error(err);25 });26var wpt = require('webpagetest');27var client = wpt('www.webpagetest.org');28 .then(function(data) {29 console.log(data);30 client.getTestResults(data.data.testId)31 .then(function(data) {32 console.log(data);33 })34 .catch(function(err)

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful