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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e93b4ef
Showing
34 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
If you're interested in contributing, just clone it down, branch, make the changes, and submit a PR! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
|
||
---------------------------------------------------------------------------- | ||
"THE BEER-WARE LICENSE" (Revision 42): | ||
As long as you retain this notice you | ||
can do whatever you want with this stuff. If we meet some day, and you think | ||
this stuff is worth it, you can buy me a beer in return. Jason Naughton | ||
---------------------------------------------------------------------------- */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Llamapocalypse First Blood Part II | ||
|
||
--- | ||
|
||
All your headlines are belong to us. | ||
|
||
--- | ||
|
||
Screens: | ||
|
||
This is your new existence: | ||
|
||
![NYT Screenshot](/llamapocalypsenytscreen.png?raw=true "New York Times") | ||
![LA Times Screenshot](/llamapocalypselatscreen.png?raw=true "LA Times") | ||
|
||
--- | ||
|
||
Download and install [chrome store link]() | ||
|
||
--- | ||
|
||
Based on the Infinite Viral extension: [source](https://github.com/vonbearshark/infinite-viral-extension), [download](https://chrome.google.com/webstore/detail/infinite-viral/gejghfapdoblkdeghocaggoalocccacg) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* find any news headings and pictures on the page | ||
* load a llama headline and picture | ||
*/ | ||
|
||
//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 getRandomNum() { | ||
return (Math.floor(Math.random() * 15) + 5).toString(); | ||
} | ||
|
||
function getRandomMost(num) { | ||
num = parseInt(num); | ||
return (Math.floor(Math.random() * num) + 1).toString(); | ||
} | ||
|
||
function generateHeadline() { | ||
var headlines = ['This is a sample headline']; | ||
|
||
decision = viralTemplates.sample(); | ||
} | ||
function generatePicture() { | ||
|
||
} | ||
|
||
//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('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 = generateHeadline(); | ||
} | ||
else if (heading.tagName !== 'A'){ | ||
//TODO: Assumes first child link is the article heading | ||
var links = Array.prototype.slice.call(heading.querySelectorAll('a')); | ||
if(links.length > 0) { | ||
links[0].innerText = generateHeadline(); | ||
} | ||
else { | ||
heading.innerText = generateHeadline(); | ||
} | ||
} | ||
} | ||
}); | ||
})(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"manifest_version": 2, | ||
|
||
"name": "Infinite Viral", | ||
"description": "Viral news all the time.", | ||
"version": "1.1.0", | ||
|
||
"browser_action": { | ||
"default_icon": "icon.png", | ||
"default_popup": "popup.html" | ||
}, | ||
"permissions": [ | ||
"activeTab" | ||
], | ||
"content_scripts": [ | ||
{ | ||
"matches": ["*://*/*"], | ||
"js": ["infiniteViral.js"], | ||
"run_at": "document_end" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
* { | ||
|
||
} | ||
|
||
body { | ||
background-color: #2196F3; | ||
color: #E3F2FD; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>Llamapocalypse</title> | ||
<link rel="stylesheet" type="text/css" href="popup.css"> | ||
</head> | ||
<body> | ||
<h1>Llamapocalypse</h1> | ||
</body> | ||
</html> |