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

Hey Cheryl! #1

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Binary file modified .DS_Store
Binary file not shown.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
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.

* 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!*
Binary file added chrome_extension.crx
Binary file not shown.
16 changes: 16 additions & 0 deletions chrome_extension.pem
Original file line number Diff line number Diff line change
@@ -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-----
Binary file modified chrome_extension/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions chrome_extension/background.js
Original file line number Diff line number Diff line change
@@ -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"
});
});
66 changes: 38 additions & 28 deletions chrome_extension/heygirl.js
Original file line number Diff line number Diff line change
@@ -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";
});
}
};
Expand All @@ -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) {
Expand All @@ -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
}

Expand Down
85 changes: 85 additions & 0 deletions chrome_extension/heyrilch.js
Original file line number Diff line number Diff line change
@@ -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);
8 changes: 4 additions & 4 deletions chrome_extension/manifest.json
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file added heyrilch.zip
Binary file not shown.