Inspiration

XKCD has a comic that suggests making certain word substitutions while reading articles can make them more interesting.

https://xkcd.com/1288/

How it works

The user enters a URL into the text box and clicks the submit button. A frame appears below the form that displays the page as if the user navigated there through the browser with certain words substituted in the article for others.

Challenges I ran into

XSS is an issue when loading a web page within another and attempting to manipulate the content of the inner page from the outer one.

Accomplishments that I'm proud of

I managed to work around the XSS issue by having the server request the page, replace relative links for absolute links (to ensure the page rendered properly in the iframe), and make the appropriate word substitutions in the page content before returning it to the client.

What I learned

How to work around XSS to get a page to appear in another and manipulate the content.

What's next for Make The News Less Boring

Show the user the most common words in the article and ask them to provide the substitutions. Replace words that are similar to the ones in the "toReplace" list (e.g. developer vs. developers).

Share this project:

Updates