diff --git a/.DS_Store b/.DS_Store index acdd358..45e0a0a 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/README.md b/README.md index 4ab9881..5a8eb6d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ -Welcome! + +HEY RILCH! + ================ ###About Sick of your Facebook friends? News getting you down? -Hey Girl is a bookmarklet that changes every image on a webpage to one of Ryan Gosling. +Hey Rilch is a bookmarklet that changes every image on a webpage to one of Cheryl Trig Merkowski. ###How To Install * Select all of the code from [the bookmarklet file](https://github.com/keccers/heygirl/blob/master/bookmarklet.js) and drag it/copy it to your bookmarks bar. @@ -11,8 +13,8 @@ Hey Girl is a bookmarklet that changes every image on a webpage to one of Ryan G * Install the Chrome Extension by [visiting the Google Play store](https://chrome.google.com/webstore/detail/hey-girl-hey/jcpmmhaffdebnmkjelaohgjmndeongip?hl=en). ###How To Use -* Click the bookmarklet on any page that needs a little HEY GIRL! - +* Click the bookmarklet on any page that needs a little CHERYL MERKOWSKI! +modified from original HEY GIRL! source code from KCHAMP! *Made with ❤ by KCHAMP!* diff --git a/chrome_extension.crx b/chrome_extension.crx new file mode 100644 index 0000000..3932713 Binary files /dev/null and b/chrome_extension.crx differ diff --git a/chrome_extension.pem b/chrome_extension.pem new file mode 100644 index 0000000..49c95b6 --- /dev/null +++ b/chrome_extension.pem @@ -0,0 +1,16 @@ +-----BEGIN PRIVATE KEY----- +MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBANsvhq06gHAVnw4sw +BWTilHucgGj9CtbbWQ7kpi4DPRFv+ytt4Ijb8WzrL8X51xzVlYnl7CbD2V+5GqsPC +//e7Bo5cKcszwWgY55vn4pMqzs11uj/tfkYRAxgsjT4V7jnItTxDLV/7D7Dld8+Mf +lRVpLn6ep5MhnA2dxF1rZYQghAgMBAAECgYEAgubrY+Gge1AuYeTQAxLOdQgXBmvI +k2xS9J2ve43QDsLpUIyfIBXR1xzremToRAqN8X5L1amFlHQoLp0WhQPr9eBj6GWa8 +nUoLsER8R9bDD7uc/UokuO13M2nOuT2mAWOQuD0+xUsVlZmPsdL3IvXB8FPr4GwsV +gdDngLdlNPwMECQQDzbybmv6yTAsJ2eZAuPTT37MzpJBIqAqOsqalqVo/4s/Jbfsc +hTSnt3hrK43xQBFZAZB7MCZqckDMPVHN5occFAkEA5n/xb3KhpMG4nkBWOrc7CZfW +yLDpfYKNCsYSpMpgbrNGiXKhFuOV3iT6wY3aYT7mN2YEZZyu2FpOpE5cTV4PbQJBA +Jy+FxhAlofaIQhT4ahENNTmHlKHrUJrjKPiYnlb3zvN8eFD0kf4/WRxvGKi8yo6gK +bZUJMkI+9nUdkvEWNh7VkCQBGV4U2naT2wqe0o62s/X3mz4+cb2DSDKU+RHQsFhaX +sd400+aVNZ7mzCI6LzAVvTxEa72rxMUXAXg+bCt+8NWECQQDTkkk9KAkFq7hmrWLV +JH7YVrLDZo2697R5lrmkOQCOosRUGXSbux99XdKB+BhHeL2j42KAtOZRVO1n8yOtc +fLg +-----END PRIVATE KEY----- diff --git a/chrome_extension/.DS_Store b/chrome_extension/.DS_Store index 518886c..7faccf9 100644 Binary files a/chrome_extension/.DS_Store and b/chrome_extension/.DS_Store differ diff --git a/chrome_extension/background.js b/chrome_extension/background.js index f53e238..50019f0 100644 --- a/chrome_extension/background.js +++ b/chrome_extension/background.js @@ -1,6 +1,6 @@ chrome.browserAction.onClicked.addListener(function(tab) { - console.log("HEY GIRL...") + console.log("HEY RILCH") chrome.tabs.executeScript(null, { - file: "heygirl.js" + file: "heyrilch.js" }); }); diff --git a/chrome_extension/heygirl.js b/chrome_extension/heygirl.js index 0b53de6..abdfea2 100644 --- a/chrome_extension/heygirl.js +++ b/chrome_extension/heygirl.js @@ -1,28 +1,28 @@ -function Gosling(ratio, imageurl){ +function CherylMerkowski(ratio, imageurl){ this.ratio = ratio; this.imageurl = imageurl; } - var getGosling = { - init: function(myGosling){ - this.myGosling = myGosling; + var getCherylMerkowski = { + init: function(myCherylMerkowski){ + this.myCherylMerkowski = myCherylMerkowski; }, horizontal: function(){ - return this.myGosling.filter(function(myGosling){ - return myGosling.ratio === "horizontal"; + return this.myCherylMerkowski.filter(function(myCherylMerkowski){ + return myCherylMerkowski.ratio === "horizontal"; }); }, vertical: function(){ - return this.myGosling.filter(function(myGosling){ - return myGosling.ratio === "vertical"; + return this.myCherylMerkowski.filter(function(myCherylMerkowski){ + return myCherylMerkowski.ratio === "vertical"; }); }, square: function (){ - return this.myGosling.filter(function(myGosling){ - return myGosling.ratio === "square"; + return this.myCherylMerkowski.filter(function(myCherylMerkowski){ + return myCherylMerkowski.ratio === "square"; }); } }; @@ -31,21 +31,31 @@ function Gosling(ratio, imageurl){ return Math.floor(Math.random() * images.length) } -var myGosling = [ -new Gosling("horizontal", "http://heygirl.io/img/gosling-horiz-1.png"), -new Gosling("horizontal", "http://heygirl.io/img/gosling-horiz-2.gif"), -new Gosling("horizontal", "http://heygirl.io/img/gosling-horiz-3.jpg"), -new Gosling("vertical", "http://heygirl.io/img/gosling-vert-1.jpg"), -new Gosling("vertical", "http://heygirl.io/img/gosling-vert-3.jpg"), -new Gosling("vertical", "http://heygirl.io/img/gosling-vert-4.jpg"), -new Gosling("vertical", "http://heygirl.io/img/gosling-vert-5.gif"), -new Gosling("vertical", "http://heygirl.io/img/gosling-vert-6.jpg"), -new Gosling("vertical", "http://heygirl.io/img/gosling-vert-7.jpg"), -new Gosling("vertical", "http://heygirl.io/img/gosling-vert-8.jpg"), -new Gosling("vertical", "http://heygirl.io/img/gosling-vert-9.jpg"), -new Gosling("square", "http://heygirl.io/img/gosling-square-1.jpg"), -new Gosling("square", "http://heygirl.io/img/gosling-square-2.jpg"), -new Gosling("square", "http://heygirl.io/img/gosling-square-3.jpg") +var myCherylMerkowski = [ +new CherylMerkowski("horizontal", "http://1.bp.blogspot.com/_xJ7mmS3wE6c/THSfEGgCkxI/AAAAAAAAAAk/MOUNexlY5nc/s1600/wh92-dootiemonsturd.jpg"), +new CherylMerkowski("horizontal", "http://i1.ytimg.com/vi/wX7X3skIVTM/hqdefault.jpg?feature=og"), +new CherylMerkowski("horizontal", "https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-frc3/294195_522294937805874_1151588118_n.jpg"), +new CherylMerkowski("horizontal", "https://sphotos-b-lga.xx.fbcdn.net/hphotos-ash3/217441_147638648728644_1895647713_n.jpg"), +new CherylMerkowski("horizontal","http://yeastradio.com/images/greylch.jpg"), +new CherylMerkowski("horizontal","http://yeastradio.com/images/chair.jpg"), +new CherylMerkowski("vertical", "http://www.jaimeshade.com/wp-content/uploads/2011/03/glamour.jpg"), +new CherylMerkowski("vertical", "http://yeastradio.com/images/rilchug.jpg"), +new CherylMerkowski("vertical", "http://farm3.staticflickr.com/2495/4005343356_e8ba71fb0b.jpg"), +new CherylMerkowski("vertical", "https://sphotos-b-lga.xx.fbcdn.net/hphotos-prn1/1148984_10151615742316902_191224180_n.jpg"), +new CherylMerkowski("vertical", "http://userserve-ak.last.fm/serve/252/3963099.jpg"), +new CherylMerkowski("vertical", "http://farm3.staticflickr.com/2507/4182122904_a9d5fc401d_s.jpg"), +new CherylMerkowski("vertical", "http://yeastradio.com/images/rilchtangle.jpg"), +new CherylMerkowski("vertical", "http://yeastradio.com/images/rect.jpg"), +new CherylMerkowski("vertical", "http://yeastradio.com/wp-content/uploads/2008/05/rilldren.jpg"), +new CherylMerkowski("vertical", "http://1.bp.blogspot.com/_xJ7mmS3wE6c/THSfEGgCkxI/AAAAAAAAAAk/MOUNexlY5nc/s1600/wh92-dootiemonsturd.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/rilchug.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/bortril.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/rilchgogo.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/mugrilch.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/vsmoke.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/hatrilch.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/crimmy.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/yeller.jpg") ] function imageRatio(image) { @@ -62,13 +72,13 @@ function imageRatio(image) { (function (document) { - getGosling.init(myGosling); + getCherylMerkowski.init(myCherylMerkowski); var images = document.getElementsByTagName('img'), length = images.length for (var i = 0; i < length; i++) { var ratio = imageRatio(images[i]); - var number = Randomize(getGosling[ratio]()); - var img = getGosling[ratio]()[number]; + var number = Randomize(getCherylMerkowski[ratio]()); + var img = getCherylMerkowski[ratio]()[number]; images[i].src = img.imageurl } diff --git a/chrome_extension/heyrilch.js b/chrome_extension/heyrilch.js new file mode 100644 index 0000000..abdfea2 --- /dev/null +++ b/chrome_extension/heyrilch.js @@ -0,0 +1,85 @@ +function CherylMerkowski(ratio, imageurl){ + this.ratio = ratio; + this.imageurl = imageurl; +} + + var getCherylMerkowski = { + init: function(myCherylMerkowski){ + this.myCherylMerkowski = myCherylMerkowski; + }, + + horizontal: function(){ + return this.myCherylMerkowski.filter(function(myCherylMerkowski){ + return myCherylMerkowski.ratio === "horizontal"; + }); + }, + + vertical: function(){ + return this.myCherylMerkowski.filter(function(myCherylMerkowski){ + return myCherylMerkowski.ratio === "vertical"; + }); + }, + + square: function (){ + return this.myCherylMerkowski.filter(function(myCherylMerkowski){ + return myCherylMerkowski.ratio === "square"; + }); + } + }; + + function Randomize(images){ + return Math.floor(Math.random() * images.length) + } + +var myCherylMerkowski = [ +new CherylMerkowski("horizontal", "http://1.bp.blogspot.com/_xJ7mmS3wE6c/THSfEGgCkxI/AAAAAAAAAAk/MOUNexlY5nc/s1600/wh92-dootiemonsturd.jpg"), +new CherylMerkowski("horizontal", "http://i1.ytimg.com/vi/wX7X3skIVTM/hqdefault.jpg?feature=og"), +new CherylMerkowski("horizontal", "https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-frc3/294195_522294937805874_1151588118_n.jpg"), +new CherylMerkowski("horizontal", "https://sphotos-b-lga.xx.fbcdn.net/hphotos-ash3/217441_147638648728644_1895647713_n.jpg"), +new CherylMerkowski("horizontal","http://yeastradio.com/images/greylch.jpg"), +new CherylMerkowski("horizontal","http://yeastradio.com/images/chair.jpg"), +new CherylMerkowski("vertical", "http://www.jaimeshade.com/wp-content/uploads/2011/03/glamour.jpg"), +new CherylMerkowski("vertical", "http://yeastradio.com/images/rilchug.jpg"), +new CherylMerkowski("vertical", "http://farm3.staticflickr.com/2495/4005343356_e8ba71fb0b.jpg"), +new CherylMerkowski("vertical", "https://sphotos-b-lga.xx.fbcdn.net/hphotos-prn1/1148984_10151615742316902_191224180_n.jpg"), +new CherylMerkowski("vertical", "http://userserve-ak.last.fm/serve/252/3963099.jpg"), +new CherylMerkowski("vertical", "http://farm3.staticflickr.com/2507/4182122904_a9d5fc401d_s.jpg"), +new CherylMerkowski("vertical", "http://yeastradio.com/images/rilchtangle.jpg"), +new CherylMerkowski("vertical", "http://yeastradio.com/images/rect.jpg"), +new CherylMerkowski("vertical", "http://yeastradio.com/wp-content/uploads/2008/05/rilldren.jpg"), +new CherylMerkowski("vertical", "http://1.bp.blogspot.com/_xJ7mmS3wE6c/THSfEGgCkxI/AAAAAAAAAAk/MOUNexlY5nc/s1600/wh92-dootiemonsturd.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/rilchug.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/bortril.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/rilchgogo.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/mugrilch.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/vsmoke.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/hatrilch.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/crimmy.jpg"), +new CherylMerkowski("square", "http://yeastradio.com/images/yeller.jpg") +] + +function imageRatio(image) { + var proportion = image.height/image.width; + + if(proportion > 1) { + return "vertical"; + } else if(proportion === 1) { + return "square"; + } else if(proportion < 1) { + return "horizontal"; + } +} + +(function (document) { + + getCherylMerkowski.init(myCherylMerkowski); + var images = document.getElementsByTagName('img'), length = images.length + + for (var i = 0; i < length; i++) { + var ratio = imageRatio(images[i]); + var number = Randomize(getCherylMerkowski[ratio]()); + var img = getCherylMerkowski[ratio]()[number]; + images[i].src = img.imageurl + } + +})(document); diff --git a/chrome_extension/manifest.json b/chrome_extension/manifest.json index b57bca2..3699d87 100644 --- a/chrome_extension/manifest.json +++ b/chrome_extension/manifest.json @@ -1,20 +1,20 @@ { - "name": "Hey Girl", + "name": "Hey Rilch", "version": "2.1", "homepage_url": "http://heygirl.io", - "description": "Replaces all images on a given page with pictures of Ryan Gosling. HEY GIRL!", + "description": "Replaces all images on a given page with pictures of Cheryl Merkowski. HEY CHERYLLL!", "icons": { "16" : "img/icon_16.png", "48" : "img/icon_48.png", "128" : "img/icon_128.png"}, "browser_action": { "default_icon": "img/icon_48.png", - "default_title": "HEY GIRL" + "default_title": "HEY RILCH" }, "permissions": [ "activeTab" ], "background": { - "scripts": ["background.js", "heygirl.js"], + "scripts": ["background.js", "heyrilch.js"], "persistent": false }, "manifest_version": 2 diff --git a/heyrilch.zip b/heyrilch.zip new file mode 100644 index 0000000..5474e61 Binary files /dev/null and b/heyrilch.zip differ