This week’s assignment was to critique three websites by altering their content using browser’s developer tools.
I chose Amazon.com, Twitter.com and
[Amazon.com]
I changed the pictures and the titles of the products, altered my name in the user information section to ‘Pushover’, modified the subscription date to B.C. 2000.
I also changed the titles for the recommended products to ‘I don’t need these #’
[giphy.com]
I chose giphy site for the next target since I just tried to alter multiple animated gif images at the same time. Using the console, I succeeded to change the images on the site to the same image.
[twitter.com]
var menues = document.querySelectorAll(".MomentGuideNavigation-target"); var titles = document.querySelectorAll(".MomentCapsuleSummary-details"); var newTitle = "tweet"; for(var i=0; i<titles.length; i++) { titles[i].textContent = newTitle; newTitle = newTitle + " tweet"; }
I also tried to change the images though I failed. Followings are the code and the error messages.
var urls = ["https://cdn2.benzinga.com/files/imagecache/1024x768xUP/images/story/2012/tt15_07_28-twitter-earnings-md_amtd_15.jpg", "http://pds.joins.com/news/component/htmlphoto_mmdata/201612/13/htm_2016121317575698565.jpg", "http://www.bluebird-electric.net/bluebird_images/Bluebird-Mountain-Puffed-Feathers-Keeping-Warm.jpg", "http://cfile28.uf.tistory.com/image/99C6A83359857E0609681A", "http://www.birdwatching.com/birdgalleries/visitor_pictures/images/mtn-bluebird-500-MarkWilson.jpg", "https://www.wbu.com/wp-content/uploads/2016/05/200x200-bird-bluebird-western.png", "https://i.pinimg.com/736x/6d/82/f1/6d82f1f21d1594d670ed6be91edb24bc--color-blue-beautiful-birds.jpg", "https://c1.staticflickr.com/6/5569/14766004200_4817867dbf_b.jpg", "https://i.pinimg.com/736x/df/3b/de/df3bdeb24445ed94ca2da74267d0101b--red-berries-nature-animals.jpg", "http://tx.audubon.org/sites/g/files/amh541/f/styles/hero_mobile/public/cbcpressroom_tuftedtitmouse-judyhowle.jpg?itok=HIfQFZMl"]; var imgs = document.querySelectorAll(".MomentMediaItem-entity"); for(var i=0; i<imgs.length; i++) { imgs[i].src = urls[i%10] }
When I tried changing the image manually, it failed as well with the same security policy related error.