Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added search engine toggle #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
}

function lucky(words, name) {
var url = "https://www.google.com/search?btnI&q=filetype:html+" + encodeURIComponent(words.join(" "));
var engine = document.querySelector('input[name="engine"]:checked').value,
url = engine === "g" ? "https://www.google.com/search?btnI&q=filetype:html+" + encodeURIComponent(words.join(" ")) : "https://duckduckgo.com/?q=\\"+encodeURIComponent(words.join(" "))+"&atb=v47-4__&ia=web";

if(name in popups
&& !popups[name].closed) {
Expand Down Expand Up @@ -77,6 +78,7 @@ <h1>Internet Noise</h1>
<p>On March 29th <a href="https://www.govtrack.us/congress/votes/115-2017/h202">congress passed a law</a> that makes it legal for your Internet Service Providers (ISP) to track and sell your personal activity online. This means that things you search for, buy, read, and say can be collected by corporations and used against you.</p>

<p>Click this button, and your browser will start passively loading random sites in browser tabs. Leave it running to fill their databases with noise. Just quit your browser when you're done.</p>
<p>Which search engine would you rather use? <input type="radio" name="engine" value="d" checked>DuckDuckGo</input> <input type="radio" name="engine" value="g">Google</input></p>

<input type="button" value="Make some noise" id="noise"/>
<input type="button" value="STOP THE NOISE!" id="stop"/>
Expand Down