This repository has been archived by the owner on Mar 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
infiniteViral.js
883 lines (758 loc) · 44.9 KB
/
infiniteViral.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
/*
* find any news headings on the page
* load a viral headline generated by Infinite Viral (https://github.com/laboon/viral_gen)
*/
var noun = new Array("Dog", "Cat", "Bird", "Timepiece", "Issue", "Person",
"Kid", "Street", "Head", "Day", "House", "Group", "Car", "Country", "City", "Problem",
"Community", "Hand", "Name", "President",
"Place", "Team", "Case", "Idea", "Company", "System", "Body",
"Program", "Information", "Question", "Bone", "Work", "Parent", "Government", "Face",
"Number", "Boss", "Office", "Point", "Door", "Home", "Candy Bar", "Candy", "Gumdrop",
"Cup", "Room", "Art", "Mother", "War","Area", "History", "Dollar Bill", "Party",
"Story", "Result", "Fact", "History Book", "Fish", "Foot", "Pastry",
"Study", "Baby Doll", "Book", "Eye", "Food", "Job",
"Moment", "Word", "Air Hockey Table", "Business",
"Spell", "Wizard", "Doll", "Code", "Airplane",
"Conference", "Keyboard", "Website", "Page", "Network", "System",
"Poison Ivy Plant", "Daisy", "Gasoline", "Campfire", "Lawn", "Pizza",
"Bridge", "Baseball", "Hockey Puck", "Cookie", "Cake",
"Football", "Antenna", "Dresser", "Kiwi", "Kumquat", "Eyepatch", "Finger Painting",
"Weasel", "Earthworm", "Koala Bear", "Frog", "Dolphin", "Record Player", "Stamp Collection",
"Dance Club", "Sidewalk", "Skate Park", "Amusement Park", "Stuffed Animal", "Teddy Bear",
"Napkin", "Fork", "Spoon", "Table", "Tablecloth", "Fireplace", "Glasses", "Moustache",
"Mouth", "Floor", "Egg", "Watermelon", "Garden", "Porch", "Gate", "Violin", "Oboe", "Piano",
"Necklace", "Broom", "Stove", "Bedroom", "Bed", "Fan", "Lamp", "Horse", "Duck", "Sheep",
"Conspiracy", "Boardroom", "Kitchen", "Stove", "Refrigerator", "Chainsaw", "Garbanzo Bean",
"Prune", "Mechanic", "Meatloaf", "Kidney", "Duck", "Guacamole", "Aardvark", "Lion", "Lollipop",
"Medicine", "Pill", "Buffet", "Election", "Wagon", "Monkey", "Space Monkey", "Legislation",
"Tree", "University", "Quiz", "Test", "Video", "Laugh", "Spectacles", "Arm", "Illness",
"Freckle", "Space Station", "Cheese Wheel", "Salami Slice", "Cucumber", "Cereal Bowl",
"Elf", "Celebrity", "Salad Bar", "Chart", "Hamburger", "Cheeseburger", "National Park",
"Pizza", "Pizza Slice", "Apartment", "Dorm Room", "Home Room", "High School", "AK-47",
"Machine Gun", "Attack Helicopter", "Bomber", "Tree", "Bowling Ball", "Pancake",
"Energy Drink", "Violin", "Pirate Ship", "Treasure Chest", "Parrot", "Heirloom",
"Tomato", "Driveway", "Sidewalk", "Picture Frame", "Painting", "Museum", "Rock", "Stone",
"River", "Sea", "Social Media Site", "Slug", "Mattress", "Hospital", "Stethoscope",
"Dinosaur", "Stegosaurus", "Tyrannosaurus Rex", "Floorboard", "Cupboard", "Teacup",
"Coffee Mug", "Computer", "Monitor", "Ball", "Bulldozer", "Tractor-Trailer", "Vampire Bat",
"Police Car", "Fire Truck", "Camera", "Steering Wheel", "Microphone", "Microwave",
"Xylophone", "Tin Can", "Bag of Manure", "Bag of Money", "Cash Register", "Freezer",
"Stapler", "Copier", "Irrigation Ditch", "Barn", "Airport", "Stick", "Piece of Sushi",
"Hot Dog", "Pumpkin Spice Latte", "Mocha", "Cappucino", "Soap", "Dance", "Pick-Up Line", "Joke",
"Dance Club", "Country Bar", "Prison", "Fairy", "Sword", "Wreath", "Ghost", "Spirit",
"Can of Beer", "Bottle of Booze", "Jack O' Lantern", "Argument", "Basement", "Lawn Chair",
"Christmas Tree Ornament", "Toilet Paper Roll", "Chocolate Chip Cookie", "Sheep", "Fence",
"Doll", "Anvil", "Bottle Rocket", "Website", "Sidewalk", "Sculpture", "Statue",
"Battleship", "Wombat", "Opossum", "Labradoodle", "Billy Goat", "Gavel", "Won Ton Soup",
"Rattlesnake", "Energy Drink", "Salad Bar", "Buffet", "Smorgasboard", "Laser Pointer",
"Supercomputer", "Blob", "Broiling Pan", "Spatula", "Fireplace", "Food Dish", "Rhinoceros",
"General Tso's Chicken", "Dinner", "Sushi Roll", "Cave", "Rabbit", "Lamp", "Poodle");
var pluralNoun = new Array("Dogs", "Cats", "Birds", "Antlers", "Antennae", "Ducks", "Goats",
"Books", "Plants", "Ants", "Blankets", "Cookies", "Cakes", "Whales", "Feathers", "Collages",
"Paintings", "Pictures", "Rugs", "Indoor Hockey Arenas", "Baseball Fields", "Buildings",
"Colleges", "Universities", "Schools", "Places", "Streams", "Chairs", "Volcanoes",
"Curtains", "Pirates", "Giraffes", "Zombies", "Cups", "Glasses", "Bookcases", "Bookshelves",
"Newspapers", "Skyscrapers", "Pipes", "Papers", "Socks", "Shirts", "Grandfathers", "Grandmothers",
"Fathers", "Mothers", "Shoes", "Children's Books", "Noses", "Eyes", "Ears", "Faces",
"Record Players", "Radios", "Doors", "Wars", "Pages", "Bicycles", "Gnomes", "Elves", "Staircases",
"Horses", "Cities", "Towns", "Airplanes", "Ducks", "Geese", "Mice", "Sheep", "Models", "Phones",
"Companies", "Non-Profit Organizations", "Streets", "Hammers", "Bedspreads", "Websites",
"Hamsters", "Restaurants", "Boats", "Lakes", "Televisions", "Movies", "Movie Theaters",
"Coal Shovels", "Shovels", "Sandboxes", "Yards", "Telephone Lines", "Coffee Shops",
"Coins", "Fish", "Reindeer", "Deer", "Crayons", "Pencils", "Pens", "Holidays",
"Hotels", "Games", "Board Games", "Kittens", "Conspiracies", "Mechanics", "Racers",
"Rollercoasters", "Clowns", "Kumquats", "Garbanzo Beans", "Navy Beans", "Aardvarks",
"Alligators", "Yaks", "Circuses", "Lions", "Lollipops", "Buffet Tables", "Monkeys",
"Space Monkeys", "Celebrities", "Quizzes", "Illnesses", "Cheese Wheels", "Carrots",
"Leaves of Spinach", "Cucumbers", "Boxes of Cereal", "Olives", "Anteaters", "Fantasies",
"Objections", "Receipts", "Whiteboards", "Desks", "Podiums", "Gold Bars", "Canned Tomatoes",
"Bubbles", "Bumblebees", "Basketballs", "Christmas Trees", "Pumpkins", "Pumpkin Spice Lattes",
"Ditches", "Polling Places", "High Heels", "Lamps", "Necklaces", "Earrings", "Three-Piece Suits",
"Pick-Up Lines", "Dances", "Dance Clubs", "Fairies", "Bottles of Vodka", "Microwave Burritos",
"Convenience Stores", "Birthday Cakes", "Philosophy Textbooks", "Hoodies", "Hipster Glasses",
"Badasses", "Leather Jackets", "Jean Jackets", "Gorillas", "Mortgages", "Skinny Jeans",
"Yoga Pants", "Snack Cakes", "Suits", "Cards", "Aliens", "UFOs", "Loch Ness Monsters",
"Mexican Jumping Beans", "Grapes", "Wines", "Sandwiches", "Flannel Shirts", "Pajamas",
"Nightlights", "Futons", "Swings", "Hiking Trails", "Telephone Poles", "Ice Cream Sandwiches",
"Stadiums", "Tattoos", "Fingernails", "Radiators", "Car Engines", "Bowling Alleys",
"Zoos", "Ice Cream Shops", "Dance Halls", "Beer Halls", "Polkas", "Waltzes", "Sheep", "Reindeer",
"Golf Balls");
var adjective = new Array("Big", "Tall", "Small", "Little", "Short", "Quaint", "Ugly", "Obsolete",
"Shiny", "Magenta", "Funny", "Sad", "Fuchsia", "Beige", "Massive", "Refinanced", "Tight", "Loose",
"Dead", "Alive", "Smart", "Dumb", "Flat", "Bumpy", "Vivacious", "Endearing",
"Slim", "Intense", "Bloodthirsty", "Beautiful", "Omniscient", "Omnipotent",
"Flowery", "Purple", "Entertaining", "Short-Lived", "Sandy", "Rough", "Imperfect",
"Perfect", "Heroic", "Minimalist", "Shoe-Losing", "Major", "Incredible", "Awe-Inspiring",
"Overflowing", "Wonderful", "Loving", "Fun-Loving",
"Oracular", "Low-Level", "High-Level", "Functional","Static", "Dynamic",
"Executive", "Fast", "Bulletproof", "Late", "Silly",
"Salty", "Sour", "Wallet-Borrowing", "Restaurant-Judging", "Picky", "Observant",
"Chair-Adjusting", "Brave", "Forgetful", "Chair-Sitting", "Mind-Blowing", "Crazy",
"Sexy", "Funny", "Birdlike", "Bird-Brained", "Miniature", "Amazing", "Inspiring",
"High-Strung", "Famous", "Light", "Dark", "Feral", "Hairy", "Unkempt", "Empty",
"Leaky", "Criminal", "Electric", "Sassy", "Frumpy", "Tiny", "Itty-Bitty",
"Prehistoric", "Immense", "Metallic", "Sharp", "Historical", "Fierce", "Loud",
"Lunar", "Interstellar", "Intergalactic", "Bohemian", "Bored", "Suspicious",
"Flirtatious", "Street-Smart", "Forgetful", "Elongated", "Religious", "Atheist",
"Abominable", "Weak", "Ambidextrous", "Irredentist", "Tooth-Filled", "Ravenous",
"Anarchistic", "Well-Directed", "Well-Fed", "Well-Maintained", "Deep", "Shallow",
"Victorian", "Formal", "Informal", "Creamy", "Tangy", "Fresh", "Magical", "Mystical",
"Ancient", "Secret", "Prophetic", "Immortal", "Undying", "Bulging", "Far-Sighted",
"Short-Sighted", "Antediluvian", "Latin", "European", "Mermaid-Like", "Medical",
"Straightforward", "Literary", "Critical", "Excited", "Backward", "Rabid", "Bombastic",
"Stinky", "Smelly", "Wanton", "Confusing", "Intellectual", "Understated", "Cheesy",
"Devious", "Pumpkin Spice", "Overblown", "Underestimated", "Underwater", "Muscular",
"Efficient", "Well-Organized", "Smooth", "Delicious", "Creamy", "Dry", "Smelly",
"Independent", "Free", "Cheap", "Ironic", "Scantily Clad", "Diaphonous", "Tired",
"Sultry", "Beguiling", "Exotic", "Long-Lived", "Immortal", "Unbelievable", "Repetitive",
"Iterative", "Disgusting", "Swampy", "Dirty", "Muddy", "Clean", "Dry", "Wet", "Voluptuous",
"Unappealing", "Clear", "Transparent", "Glorious", "Sacrificial", "Electric", "Mechanical",
"Automatic", "Unyielding", "Invincible", "Rapid", "Nervous", "Calm", "Contemplative",
"Cerebral", "Voracious", "Starving", "Full", "Killer", "Wicked", "Rational", "Real",
"Actual", "Homemade", "Cigar-Chomping", "Aerodynamic", "Sinister", "Doubting",
"Robotic", "Monosyllabic", "Maniacal", "Intellectual", "Postmodern", "Prehistoric",
"Internationally Acclaimed", "Penniless");
var goodSuperlative = new Array("Cutest", "Fluffiest", "Best", "Shiniest", "Most Awesome",
"Fastest", "Nicest", "Most Awe-Inspiring", "Happiest", "Most Enlightened",
"Best-Performing", "Most Powerful", "Most Humble", "Greatest", "Most Epic",
"Most Elegant", "Most Mathematical", "Strangest", "Strongest", "Most Difficult",
"Furriest", "Funniest", "Most Hilarious", "Most Beautiful", "Prettiest", "Loudest",
"Noisiest", "Brightest", "Smartest", "Most Honest", "Friendliest", "Hairiest",
"Most Dynamic", "Latest", "Saltiest", "Dirtiest", "Cleanest", "Most Inspiring",
"Prettiest", "Deepest", "Roundest", "Sharpest", "Skinniest", "Most Gentle", "Most Energetic",
"Most Flexible", "Tallest", "Sharpest", "Least Hungry", "Most Calming", "Most Entertaining",
"Most Professional", "Most Giving", "Most Loving", "Finest", "Wooliest", "Most Rambunctious",
"Most Ambitious", "Quietest", "Highest", "Most Intellectual", "Most Straightforward",
"Richest", "Longest", "Most Masculine", "Most Feminine", "Most Hopeful", "Cheesiest" );
var badSuperlative = new Array("Least Fluffy", "Baldest", "Worst", "Sickest",
"Slowest", "Meanest", "Angriest", "Least Epic", "Saddest", "Most Depressing",
"Ugliest", "Least Enlightened", "Worst-Performing", "Least Powerful", "Least Humble",
"Smallest", "Least Elegant", "Most Normal", "Weakest", "Least Difficult",
"Least Furry", "Least Funny", "Ugliest", "Crankiest", "Quietest", "Meekest",
"Least Friendly", "Least Honest", "Dimmest", "Sleepiest", "Most Confused", "Fattest",
"Most Evil", "Shortest", "Smallest", "Sleepiest", "Dopiest", "Hungriest", "Most Vicious",
"Least Professional", "Least Entertaining", "Loudest", "Least Giving", "Most Wiry",
"Least Ambitious", "Loudest", "Lowest", "Least Intellectual", "Poorest", "Most Confusing",
"Least Masculine", "Least Feminine", "Least Hopeful", "Least Cheesy");
var person = new Array("Programmer", "Jogger", "Cyclist", "Hairdresser", "Narcissist",
"Police Officer", "Wife", "Balloon Artist", "Husband", "Pedestrian", "Skateboarder",
"Fashion Designer", "Lion Tamer", "Monkey Trainer", "Acrobat", "Crook", "Outlaw",
"Spelunker", "Adventurer", "Girlfriend", "Boyfriend", "Escape Artist",
"Father", "Mother", "Sister", "Brother", "Dog Groomer", "Soldier", "Nuclear Technician",
"Technician", "Ballroom Dancer", "Dancer", "Climber", "Biker", "Reader", "Author",
"Writer", "Mathematician", "Lover", "Baseball Player", "Office Worker", "Banker",
"Accountant", "President", "Vice President", "CEO", "Retail Worker", "Rapper",
"Passerby", "Passenger", "Driver", "Model", "Teenager", "Child", "Plumber",
"Carpenter", "Web Designer", "Designer", "Professor", "Teacher", "Model", "Fashion Designer",
"TV Dad", "TV Mom", "Former Child Star", "Journalist", "Scientist", "Grad Student",
"Student", "Internet Commenter", "Forest Ranger", "Bully", "Classmate", "Co-worker",
"Cartoonist", "Butler", "Knight", "Aristocrat", "Peasant", "Noble", "King", "Prime Minister",
"Senator", "Reporter", "Miner", "Space Cowboy", "Cowboy", "Gangster", "Role-Player",
"College Student", "Shepherd", "BASE Jumper", "Welder", "Underwater Welder", "Exterminator",
"Cyborg", "Centaur", "Photographer", "Best Friend", "Cousin", "Neighbor", "Crush",
"Secret Crush", "Haberdasher", "Editor", "Rodeo Clown", "Football Player", "Hockey Player",
"Reader", "Philosopher", "Marxist", "Socialist", "Conservative", "Republican", "Democrat",
"Monarchist", "Civil War Re-Enactor", "Pilot", "Classmate", "English Teacher",
"Exchange Student", "Confidant", "Spy", "Tailor", "Card Shark", "Pool Shark",
"Boss", "Security Guard", "Artist", "Social Media Addict", "Maid", "Party Host",
"Hostest With the Mostest", "TV Personality", "Talk Show Host", "Comedian", "Partygoer",
"Friend", "Blind Date", "Hero", "Superhero", "Bandit", "Jailbird", "Nerd", "Dork", "Geek",
"Prisoner", "Bodybuilder", "Internet Addict", "Vegan", "Vegetarian", "Nose-Picker",
"Meth Dealer", "Drill Sergeant", "Housewife", "Police Officer", "Science Fiction Fan",
"Ex-Boyfriend", "Ex-Girlfriend", "Mariachi Singer", "Lounge Singer", "Bird Caller",
"Stamp Collector", "Watch Enthusiast", "Babysitter", "Friend", "Neighbor", "Lover",
"Best Friend", "College Roommate", "Roommate", "Fellow Apartment Dweller", "Landlord",
"Superintendent", "Commanding Officer", "Principal", "Sergeant", "Captain",
"Coach", "Mentor", "Role Model", "Actor");
var verbPast = new Array("Walked", "Finished", "Silenced", "Kicked", "Punched", "Ate",
"Dug", "Judged", "Programmed", "Refactored", "Restored", "Drew", "Entertained",
"Drove", "Flew", "Understood", "Drank", "Rapped", "Quaffed", "Fixed", "Spilled",
"Cast", "Let Go Of", "Engaged", "Married", "Rejected", "Wrote", "Emailed",
"Connected", "Corrected", "Engineered", "Created", "Rolled", "Reduced", "Threatened",
"Raised", "Funded", "Unrolled", "Rolled Up", "Injected", "Selected",
"Rejected", "Impacted", "Scooped", "Ran", "Rammed", "Explored", "Cracked",
"Cut", "Foraged", "Defenestrated", "Quacked", "Compacted",
"Quit", "Bejeweled", "Bedazzled", "Amused", "Awakened", "Sparked", "Started",
"Ended", "Cheapened", "Rattled", "Guzzled", "Gave Away", "Deleted", "Elevated",
"Complained", "Quacked", "Barked", "Smiled", "Frowned", "Bamboozled", "Fooled",
"Tripped", "Had", "Did", "Said", "Went", "Got", "Made", "Knew", "Thought",
"Took", "Saw", "Wanted", "Used", "Found", "Gave", "Told", "Worked", "Called",
"Tried", "Asked", "Needed", "Felt", "Left", "Put", "Meant", "Kept", "Began",
"Seemed", "Showed", "Heard", "Ran", "Lived", "Believed", "Stood", "Lost",
"Paid", "Met", "Included", "Excluded", "Continued", "Paused", "Stopped",
"Changed", "Watched", "Followed", "Stopped", "Created", "Generated", "Read",
"Led", "Spoke", "Spent", "Grew", "Opened", "Closed", "Walked", "Won", "Lost",
"Taught", "Offered", "Remembered", "Appeared", "Considered", "Bought", "Sold",
"Served", "Died", "Sent", "Stayed", "Built", "Destroyed", "Passed", "Failed",
"Raised", "Cooked", "Sold", "Decided", "Returned", "Regressed", "Explained",
"Expanded", "Broke", "Developed", "Received", "Covered", "Drew", "Chose", "Produced");
var gerund = new Array("Grooming", "Walking", "Driving", "Eating", "Yelling", "Talking",
"Modeling", "Drinking", "Seeing", "Feeling", "Entertaining", "Dining", "Jumping",
"Biking", "Whispering", "Programming", "Playing", "Climbing", "Fiddling",
"Procrastinating", "Entertaining", "Performing", "Growing", "Meditating",
"Juice Cleansing", "Cleaning", "Scrubbing", "Crouching", "Thinking",
"Speculating", "Investing", "Researching",
"Electing", "Texting", "Hiking", "Playing",
"Faking", "Taking", "Baking", "Backing",
"Seeming", "Showing", "Hearing", "Running", "Living", "Believing", "Standing", "Losing",
"Paying", "Meeting", "Including", "Excluding", "Continuing", "Pausing", "Stopping",
"Changing", "Watching", "Following", "Stopping", "Creating", "Generating", "Reading",
"Leading", "Speaking", "Spending", "Growing", "Opening", "Closing", "Walking", "Winning", "Losing",
"Teaching", "Offering", "Remembering", "Appearing", "Considering", "Buying", "Selling",
"Serving", "Dying", "Sending", "Staying", "Building", "Destroying", "Passing", "Failing",
"Raising", "Cooking", "Selling", "Deciding", "Returning", "Regressing", "Explaining",
"Expanding", "Breaking", "Developing", "Receiving", "Covering", "Drawing", "Choosing", "Producing",
"Drooling", "Slobbering", "Slandering", "Rejecting", "Undermining", "Picking", "Kicking",
"Punching", "Loving", "Editorializing", "Moving", "Smoothing", "Linking", "Crying",
"Laughing", "Endowing", "Mocking", "Snacking", "Eating", "Shooting", "Dating", "Marrying",
"Engaging");
var blewMeAway = new Array("Blew Me Away", "Blew My Mind", "Made Me Look Again",
"Made Me Rethink My Position", "Was Unbelievable", "Was Just Too Much For Me",
"Was Just Too Much", "Was Out Of This World", "Made Me Jump Out Of My Skin",
"Warmed My Heart", "Restored My Faith In Humanity", "Made Me Love Him Even More",
"Made Me Love Her Even More", "Made Me Love Him", "Made Me Love Her",
"Restored My Faith", "Made Me Gasp", "Warmed My Heart", "Taught Me What Love Really Is",
"Restored My Belief In Love", "Restored My Spirit", "Taught Me About True Love",
"Cannot Be Believed", "Is Just Too Much", "Enlightened Me",
"Made Me Realize How Good I Have It", "Was My Favorite", "Was Amazing",
"Made Me Laugh Out Loud", "Made Me Break Down And Cry", "Made Me Cry", "Gave Me Chills");
var mayShockYou = new Array("May Shock You", "May Surprise You", "May Not Be What You Were Expecting",
"Might Scare You", "Might Just Make This World A Better Place");
var timePeriod = new Array("Millisecond", "Minute", "Hour", "Day", "Monday", "Weekend", "Week", "Season",
"Fortnight", "Month", "Year", "Decade", "Century", "Millenium", "Summer", "Winter", "Fall", "Spring");
var wh = new Array("What", "Where", "When", "Why", "How");
var decades = new Array("50's", "60's", "70's", "80's", "90's", "00's");
var places = new Array("Pittsburgh", "The United States", "New York", "Peoria", "San Francisco",
"North America", "South America", "Costa Rica", "Central America", "Tokyo", "Japan", "China",
"Mongolia", "Australia", "Perth", "Narnia", "Paris", "London", "Norway", "Sweden", "Moscow",
"Uzbekistan", "Kazakhstan", "Tajikistan", "Azerbaijan", "Finland", "Scotland", "Dublin",
"London", "Paris", "Chicago", "Harvard", "MIT", "Carnegie Mellon University", "Ohio",
"Namibia", "South Africa", "Egypt", "Saudi Arabia", "the Middle East", "Iraq", "Iran",
"Chile", "Argentina", "Brazil", "Paraguay", "Your Neighborhood", "Your City", "Your Town",
"Your Country", "Hawaii", "The Faroe Islands", "Cambodia", "Laos", "Vietnam", "France",
"Spain", "Monaco", "The Pacific Ocean", "The Atlantic Ocean", "The Indian Ocean",
"Antarctica", "India", "Pakistan", "The Former Soviet Union", "The Former Yugoslavia",
"Germany", "Berlin", "Hungary", "Turkey", "Budapest", "Europe", "Asia", "The Phillipines",
"Middle-Earth", "New England", "New South Wales", "The Netherlands", "Belgium",
"Lichtenstein", "Luxembourg", "Tibet", "The Himalayas", "Turkmenistan", "The Gobi Desert",
"The Sahara Desert", "Libya", "Manchester", "Liverpool", "Florida", "Texas", "Washington, DC",
"Mexico", "Canada", "Ontario", "Alaska", "California", "New Jersey", "North Dakota", "North Korea",
"Tashkent", "The Panama Canal", "Mexico City", "Siberia", "The Arctic Circle", "Svalbard",
"The Solar System", "Walla Walla, Washington", "Cucamonga", "Squirrel Hill", "Yemen", "Qatar",
"Abu Dhabi", "Baghdad", "Beirut", "Beijing", "Singapore", "Hong Kong", "Pakistan", "Bangladesh",
"Nepal", "Thailand", "Guatemala", "El Salvador", "Panama", "Chile", "Argentina", "Brazil");
//extends array to include a sample function
Array.prototype.sample = function () {
return this[Math.floor(Math.random() * this.length)]
}
function capitalize(str) {
return str.charAt(0).toUpperCase() + str.slice(1);
}
function aOrAn(str) {
if(str.match("^[aeiouAEIOU]")) {
return "An " + str;
} else {
return "A " + str;
}
}
function getRandomNum() {
return (Math.floor(Math.random() * 15) + 5).toString();
}
function getRandomMost(num) {
num = parseInt(num);
return (Math.floor(Math.random() * num) + 1).toString();
}
function generateOnlyPeople() {
var toReturn = "Only People Who " + verbPast.sample() + " Their " +
noun.sample() + " Will Understand This " +
adjective.sample() + " " + noun.sample() + ".";
return toReturn;
}
function generateNReasons() {
var num = getRandomNum();
var numMost = getRandomMost(num);
var toReturn = num + " Reasons That This " + person.sample() + " " + verbPast.sample() + " " +
["His", "Her", "Somebody's"].sample() + " " + noun.sample() + "."
+ " Number " + numMost + " " + blewMeAway.sample() + ".";
return toReturn;
}
function generateNBest() {
var superlative = (Math.random() < 0.5) ? goodSuperlative.sample() : badSuperlative.sample();
var num = getRandomNum();
var numMost = (Math.floor(Math.random() * num) + 1).toString();
var toReturn = "The " + num + " " + superlative + " Kinds Of " +
adjective.sample() + " " + person.sample() + "." + " Number " +
numMost + " " + blewMeAway.sample() + ".";
return toReturn;
}
function generateBlewMeAway() {
var toReturn = "This " + adjective.sample() + " "
+ person.sample() + " " + verbPast.sample() + " " + ["His", "Her"].sample() + " " + noun.sample()
+ ". What Happened Next " + blewMeAway.sample() + ".";
return toReturn;
}
function generateMayShock() {
var toReturn = capitalize(wh.sample()) + " This " + adjective.sample() + " " + person.sample()
+ " " + verbPast.sample()
+ " " + ["His", "Her"].sample() + " " + noun.sample()
+ " " + mayShockYou.sample() + ".";
return toReturn;
}
function generateTwist() {
var toReturn = "I Thought This " + person.sample() + " Was " + adjective.sample()
+ " Until I Realized " + ["His", "Her"].sample() + " "
+ noun.sample() + " " + ["Was", "Is", "Could Be", "Might Be"].sample() + " " + adjective.sample() + "!";
return toReturn;
}
function generateHotTrend() {
var toReturn = "The Hot New Trend For " + ["This", "Next"].sample() + " "
+ timePeriod.sample() + "? " + gerund.sample()
+ " " + ["Your", "The"].sample() + " " + noun.sample()
+ " Just Like " + aOrAn(person.sample()) + "!";
return toReturn;
}
function generateSecrets() {
var num = getRandomNum();
var numMost = getRandomMost(num);
var toReturn = num + " Secrets Of This " + adjective.sample() + " " + person.sample() + ". "
+ "Number " + numMost + " " + blewMeAway.sample() + ".";
return toReturn;
}
function generateWhatXAreYou() {
var toReturn = "What Kind Of " + adjective.sample() + " " + person.sample() + " Would You Be? "
+ "Take Our Quiz And Find Out!";
return toReturn;
}
function generateStopEverything() {
var toReturn = ["Stop", "Drop", "Forget"].sample() + " Everything And "
+ ["Look At", "Behold", "Stare At"].sample() + " This " + adjective.sample()
+ " " + noun.sample() + "!";
return toReturn;
}
function generateOnlyXKids() {
p = person.sample();
n = noun.sample();
var toReturn = "Only " + decades.sample() + " Kids Will Understand This " +
adjective.sample() + " " + [p, n].sample() + "!";
return toReturn;
}
function generatePics() {
var num = getRandomNum();
var numMost = getRandomMost(num);
var toReturn = num + " " + ["Pics", "Pictures", "Images", "Snapshots"].sample() + " Of The World's "
+ goodSuperlative.sample() + " " + pluralNoun.sample() + "! Number " + numMost + " Is So "
+ adjective.sample() + "!";
return toReturn;
}
function generateOmg() {
var p = person.sample();
var n = noun.sample();
var toReturn = "OMG. You "
+ ["Need To", "Really Need To", "Should", "Have To", "MUST", "Can"].sample()
+ " " + ["See", "Check Out", "Look At", "Hang Out With", "Figure Out"].sample()
+ " " + ["This", "The", "My", "His", "Her"].sample() + " "
+ adjective.sample() + " " + [p, n].sample() + "!";
return toReturn;
}
function generateBetter() {
var num = getRandomNum();
var numMost = getRandomMost(num);
var toReturn = num + " " + ["Reasons", "Ways"].sample() + " That " + gerund.sample()
+ " Can Make You " + adjective.sample() + " When You're In " + places.sample() + ".";
return toReturn;
}
function generateThoughts() {
var num = getRandomNum();
var numMost = getRandomMost(num);
b = blewMeAway.sample();
m = mayShockYou.sample();
var toReturn = num + " " + ["Thoughts", "Reactions"].sample() + " You Have When " + gerund.sample() + " "
+ ["For The First Time", "For The Last Time", "Repeatedly", "Unexpectedly",
"On a Saturday", "On A Monday", "With Your Parents", "On A Boat", "With Your Crush",
"In Your Hometown", "At Your High School Reunion", "With Your Prom Date"].sample() + ". "
+ "Number " + numMost + " " + [b, m].sample() + ".";
return toReturn;
}
function generateTheBestXInY() {
g = goodSuperlative.sample();
b = badSuperlative.sample();
var toReturn = ["This", "That"].sample() + " " + ["Is", "Was"].sample()
+ " " + ["Definitely", "Certainly", "Obviously", "Without A Doubt", "Clearly"].sample()
+ " the " + [g,b].sample() + " " + noun.sample() + " In All Of "
+ places.sample() + ".";
return toReturn;
}
function generateWays() {
var num = getRandomNum();
var numMost = getRandomMost(num);
b = blewMeAway.sample();
m = mayShockYou.sample();
p = pluralNoun.sample();
s = noun.sample();
var toReturn = num + " " + adjective.sample() + " Ways That The " + goodSuperlative.sample()
+ " " + person.sample() + " is "+ gerund.sample() + " " + ["His", "Her"].sample() + " "
+ [p, s].sample() + ". Number " + numMost + " " + [b, m].sample() + ".";
return toReturn;
}
function generateXInY() {
var toReturn = "What You Don't Know About " + adjective.sample() + " " + pluralNoun.sample()
+ " In " + places.sample() + " " + mayShockYou.sample() + "!";
return toReturn;
}
function generateHonest() {
var toReturn = "If Everybody In " + places.sample() + " Were Honest, They'd Tell You That Their "
+ pluralNoun.sample() + " Are " + ["Really Just", "Actually Just", "In Reality", "Supposed To Be"].sample()
+ " " + adjective.sample() + " " + pluralNoun.sample() + ".";
return toReturn;
}
function generateVideo() {
var g = "The " + goodSuperlative.sample();
var b = "The " + badSuperlative.sample();
var a = adjective.sample();
var p = pluralNoun.sample();
var n = noun.sample();
var toReturn = ["LIVE", "RAW", "AMAZING", "REAL-TIME"].sample() + " Video Of "
+ [a, b, g].sample() + " " + person.sample() + " in " + places.sample() + " "
+ gerund.sample() + " " + ["His", "Her", "My", "Somebody's"].sample() + " "
+ adjective.sample() + " " + [p, n].sample() + "!";
return toReturn;
}
function generatePerfectResponses() {
var num = getRandomNum();
var numMost = getRandomMost(num);
var toReturn = num + " Perfect " + ["Responses", "Comebacks"].sample()
+ " To Your " + person.sample() + " When " + ["He", "She"].sample() + " "
+ verbPast.sample() + " Your " + adjective.sample() + " " + noun.sample() + ". Number "
+ numMost + " " + blewMeAway.sample() + ".";
return toReturn;
}
function generateGoodBadSuper() {
pronoun = ["He", "She", "It"].sample();
var toReturn = "I Thought " + pronoun + " Was The " + goodSuperlative.sample()
+ " " + noun.sample() + ", But " + ["Actually", "In Reality", "In Fact"].sample()
+ " " + pronoun + " Was The " + badSuperlative.sample() + " " + noun.sample() + ".";
return toReturn;
}
function generateIfXLikeY() {
var toReturn = "If " + pluralNoun.sample() + " " + verbPast.sample() + " Like "
+ adjective.sample() + " " + pluralNoun.sample() + "...";
return toReturn;
}
function generateIfXLikeX() {
p = pluralNoun.sample();
var toReturn = "If " + adjective.sample() + " " + p + " " + verbPast.sample() + " Like "
+ adjective.sample() + " " + p + "...";
return toReturn;
}
function generateXWasAY() {
var toReturn = "I Always " + ["Thought", "Knew", "Figured", "Suspected"].sample() + " That "
+ ["This", "My", "That"].sample() + " " + person.sample() + " Was " + adjective.sample()
+ ["...", " -", ".", "!"].sample() + " But Then I " + ["Discovered", "Saw", "Found Out"].sample()
+ " That " + ["He", "She"].sample() + " " + verbPast.sample() + " "
+ ["This", "That", "The", "An Entire", "My"].sample() + " " + noun.sample()
+ ["...", "!", "."].sample();
return toReturn;
}
function generateTop10() {
var toReturn = "The 10 " + ["Top", "Hottest", "Wildest", "Sexiest"].sample()
+ " " + pluralNoun.sample() + " In " + places.sample() +"!";
return toReturn;
}
function generateWeirdTrick() {
var toReturn = ["Dad", "Mom", "Teacher", "Grandfather", "Grandmother"].sample() + " In "
+ places.sample() + " Discovers One Weird Trick For " + gerund.sample() + " "
+ pluralNoun.sample() + "!";
return toReturn;
}
function generateDidNotKnow() {
var num = getRandomNum();
var numMost = getRandomMost(num);
var toReturn = num +" Things You Didn't Know About " + pluralNoun.sample() + " In "
+ places.sample() + ". " + "Number " + numMost + " " + blewMeAway.sample() + ".";
return toReturn;
}
function generatePercent() {
var percent = (Math.floor(Math.random() * 98) + 1).toString() + "%";
var toReturn = ["A Shocking", "An Amazing", "Incredibly,", "An Unbelievable", "Only"].sample() + " "
+ percent + " Of People In " + places.sample() + " " + ["Think", "Know", "Understand"].sample()
+ " That " + pluralNoun.sample() + " Are "
+ ["Actually", "Really", "In Reality", "Supposed To Be"].sample() + " "
+ pluralNoun.sample() + "."
return toReturn;
}
function generateThinkXAreY() {
n = pluralNoun.sample();
a = adjective.sample();
var toReturn = "This " + person.sample() + " " + ["Insists", "Thinks", "Says"].sample() + " That "
+ pluralNoun.sample() + " Are " + [n,a].sample() + ". This "
+ ["Movie", "Video", "Article", "Speech"].sample() + " Proves "
+ ["Him", "Her"].sample() + " " + ["Right", "Wrong"].sample() + ".";
return toReturn;
}
function generateForOneDay() {
vp = verbPast.sample();
var toReturn = "For One " + timePeriod.sample() + ", I " + vp + " What This "
+ person.sample() + " " + vp + ". It Was "
+ ["Amazing", "Beautiful", "Mind-Blowing", "Depressing", "Heavenly"].sample() + ".";
return toReturn;
}
function generateItOnlyTakes() {
var toReturn = "It Only Takes One " + timePeriod.sample() + " To Show How These "
+ pluralNoun.sample() + " Are " + gerund.sample() + " Their " + pluralNoun.sample() + ".";
return toReturn;
}
function generateDescribe() {
var toReturn = "I've Never Heard Anyone " + ["Describe", "Explain", "Talk About"].sample()
+ " " + gerund.sample() + " Their " + noun.sample() + " Like This Before.";
return toReturn;
}
function generateTogether() {
var num = getRandomNum();
var toReturn = aOrAn(person.sample()) + " And " + aOrAn(person.sample()) + " "
+ ["Were Together", "Were Partners", "Were Married", "Dated"].sample()
+ " For " + num + " Years. Then " + ["He", "She"].sample() + " "
+ ["Found Out About", "Discovered", "Forgot", "Uncovered"].sample()
+ " The " + noun.sample() + ".";
return toReturn;
}
function generateThisPerson() {
var toReturn = "This " + ["Man", "Woman"].sample() + " From " + places.sample()
+ " Made A Lot of People "
+ ["Angry", "Mad", "Upset", "Happy", "Sad", "Crazy"].sample()
+ " Just By "
+ gerund.sample() + " Some " + pluralNoun.sample() + ".";
return toReturn;
}
function generateWord() {
var num = getRandomNum();
var toReturn = "This " + num + "-Letter Word Could Be Offensive To Your "
+ person.sample() + ". Or Anyone Who " + ["Is", "Is Not"].sample()
+ " " + adjective.sample() + ".";
return toReturn;
}
function generateIWish() {
var toReturn = "This " + person.sample() + " Was Just " + gerund.sample()
+ " In " + places.sample() + ". I Wish That Didn't "
+ ["Shock", "Scare", "Surprise", "Endanger", "Delight"].sample() + " Me.";
return toReturn;
}
function generateTwoCountries() {
var toReturn = places.sample() + " Is " + ["Incredibly", "So Far", "Somewhat", "Just A Little"].sample()
+ " " + ["Ahead Of", "Behind"].sample() + " " + places.sample() + " When It Comes To "
+ pluralNoun.sample() + ".";
return toReturn;
}
function generateSinceWhen() {
var toReturn = "Since When Is Being " + adjective.sample() + " "
+ aOrAn(["Crime", "Blessing", "Drawback", "Felony", "Misdemeanor"].sample())
+ "? In " + places.sample() + ", Since "
+ ["Yesterday", "Last Week", "The Dawn of History", "This Man Was Born", "This Woman Was Born"].sample()
+ ".";
return toReturn;
}
function generateFutureDest() {
var year = (Math.floor(Math.random() * 220) + 1850).toString();
var num = getRandomNum();
var toReturn = num + " " + adjective.sample() + " Images Of " + places.sample()
+ " In " + year + "!";
return toReturn;
}
function generateNRules() {
var num = getRandomNum();
var numMost = getRandomMost(num);
var toReturn = "This " + person.sample() + " Wrote " + num + " Rules For "
+ gerund.sample() + ". Number " + numMost + " " + blewMeAway.sample() + ".";
return toReturn;
}
function generateNotThatKind() {
pl = places.sample();
var toReturn = "Every " + timePeriod.sample() + " In " + places.sample() + ", "
+ "There's " + aOrAn(noun.sample()) + " " + ["Party", "Festival", "Celebration"].sample()
+ " (Not That Kind). Now "
+ ["The Police Department", "The Neighborhood", "The Government", "The United Nations", pl].sample()
+ " Wants To "
+ ["Shut It Down", "Take It Everywhere", "Copy It"].sample() + ".";
return toReturn;
}
function generateIsItOK() {
var toReturn = "We Asked This " + person.sample() + " If It Was OK If This "
+ person.sample() + " " + verbPast.sample() + " " + ["His", "Her"].sample() + " " + pluralNoun.sample()
+ ". The " + ["Response", "Answer"].sample() + " " + mayShockYou.sample() + ".";
return toReturn;
}
function generate() {
var viralTemplates = new Array("blew-me-away", "only-people", "n-reasons", "n-best", "may-shock",
"twist", "hot-trend", "secrets", "stop-everything", "what-x-are-you", "only-x-kids", "pics",
"omg", "better", "thoughts", "the-best-x-in-y", "ways", "x-in-y", "honest", "video", "perfect-responses",
"good-bad-super", "if-x-like-y", "if-x-like-x", "x-was-a-y", "top-10", "weird-trick", "did-not-know",
"percent", "think-x-are-y", "for-one-day", "it-only-takes", "describe", "together", "this-person",
"word", "i-wish", "two-countries", "since-when", "future-dest", "n-rules", "not-that-kind",
"is-it-ok");
decision = viralTemplates.sample();
switch (decision) {
case "is-it-ok":
return generateIsItOK();
break;
case "not-that-kind":
return generateNotThatKind();
break;
case "n-rules":
return generateNRules();
break;
case "future-dest":
return generateFutureDest();
break;
case "since-when":
return generateSinceWhen();
break;
case "two-countries":
return generateTwoCountries();
break;
case "i-wish":
return generateIWish();
break;
case "word":
return generateWord();
break;
case "this-person":
return generateThisPerson();
break;
case "together":
return generateTogether();
break;
case "describe":
return generateDescribe();
break;
case "it-only-takes":
return generateItOnlyTakes();
break;
case "for-one-day":
return generateForOneDay();
break;
case "think-x-are-y":
return generateThinkXAreY();
break;
case "percent":
return generatePercent();
break;
case "did-not-know":
return generateDidNotKnow();
break;
case "weird-trick":
return generateWeirdTrick();
break;
case "top-10":
return generateTop10();
break;
case "x-was-a-y":
return generateXWasAY();
break;
case "if-x-like-y":
return generateIfXLikeY();
break;
case "if-x-like-x":
return generateIfXLikeX();
break;
case "good-bad-super":
return generateGoodBadSuper();
break;
case "perfect-responses":
return generatePerfectResponses();
break;
case "video":
return generateVideo();
break;
case "honest":
return generateHonest();
break;
case "x-in-y":
return generateXInY();
break;
case "ways":
return generateWays();
break;
case "the-best-x-in-y":
return generateTheBestXInY();
break;
case "thoughts":
return generateThoughts();
break;
case "better":
return generateBetter();
break;
case "omg":
return generateOmg();
break;
case "pics":
return generatePics();
break;
case "blew-me-away":
return generateBlewMeAway();
break;
case "only-people":
return generateOnlyPeople();
break;
case "n-reasons":
return generateNReasons();
break;
case "n-best":
return generateNBest();
break;
case "may-shock":
return generateMayShock();
break;
case "twist":
return generateTwist();
break;
case "hot-trend":
return generateHotTrend();
break;
case "stop-everything":
return generateStopEverything();
break;
case "secrets":
return generateSecrets();
break;
case "what-x-are-you":
return generateWhatXAreYou();
break;
case "only-x-kids":
return generateOnlyXKids();
break;
default:
return decision;
}
}
//alright, generate the headlines!
//get a headline with: generate();
//find the title on the page
//this is tricky, because their's no standard headlines
//so look through all likely element classes for keywords
//right now it assumes a pretty semantic DOM
(function() {
var headings = Array.prototype.slice.call(document.querySelectorAll('div, h1, h2, h3, h4, h5, h6, a')).map(
function(heading) {
if(heading.className.toLowerCase().indexOf('story') > -1 ||
heading.className.toLowerCase().indexOf('headline') > -1 ||
heading.className.toLowerCase().indexOf('title') > -1 ||
heading.className.toLowerCase().indexOf('lede') > -1) {
if(heading.tagName === 'A' && /\S/.test(heading.innerText)) {
heading.innerText = generate();
}
else if (heading.tagName !== 'A'){
//TODO: Assumes first child link is the article heading
var immediateLinkChild = Array.prototype.slice.call(heading.querySelectorAll('a'))[0];
if(immediateLinkChild) {
//Shouldn't alter inner text if there's an child image tag
var immediateImgChildren = Array.prototype.slice.call(immediateLinkChild.querySelectorAll('img'));
if(!immediateImgChildren.length > 0) {
immediateLinkChild.innerText = generate();
}
}
else if (heading.tagName !== 'DIV') {
heading.innerText = generate();
}
}
}
});
})();