I don't know what I did, but it fixed things?!
This commit is contained in:
parent
b3b169f0f3
commit
4bc4b791c2
6 changed files with 45 additions and 11 deletions
|
@ -6,8 +6,10 @@ for (var i = 0; i < sites.length; i++) {
|
|||
pattern = Object.keys(sites[i])[0];
|
||||
script = sites[i][pattern];
|
||||
content_scripts = ["./lib/jquery.js", "./image-lookup.js", "./injections/" + script];
|
||||
console.log('pattern: ' + pattern);
|
||||
console.log('content_scripts: ' + content_scripts);
|
||||
pageMod.PageMod({
|
||||
include: pattern,
|
||||
contentScriptFile: content_scripts
|
||||
contentScriptFile: content_scripts,
|
||||
});
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
var image_decoder = {
|
||||
"as" : "https://dujrsrsgsd3nh.cloudfront.net/img/emoticons/23362/noot-1438871175.png"
|
||||
|
||||
"form" : "https://dujrsrsgsd3nh.cloudfront.net/img/emoticons/23362/noot-1438871175.png"
|
||||
}
|
||||
console.log("Image Decoder imported");
|
|
@ -34,3 +34,9 @@ $('._55ln').on('click', function() { //Facebook sidebar person is clicked
|
|||
$('._552m').on('input paste', function() { // Text change in textbox. Mainly used to cover all bases
|
||||
change_chat_tabs();
|
||||
});
|
||||
|
||||
|
||||
$(window).on('load', function() { // When window loads
|
||||
change_chat_tabs();
|
||||
});
|
||||
alert("Facebook");
|
24
src/injections/github.js
Normal file
24
src/injections/github.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
function change_comments() {
|
||||
$('.comment-body').each(function() {
|
||||
for (var i = 0; i < image_decoder.length; i++) {
|
||||
console.log('Checking for ' + image_decoder[i][0])
|
||||
$(this).html($(this).html().replace(
|
||||
image_decoder[i][0],
|
||||
"<img style='height: 30px; width: 30px;' src='" + image_decoder[i][1] + "'/>"
|
||||
));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("button.btn[name='comment_and_close']").prev().on('click', function(){ // When the comment button is clicked
|
||||
change_comments();
|
||||
});
|
||||
|
||||
$('.js-comment-container').on('load change', function(){ // when another comment comes in
|
||||
change_comments();
|
||||
});
|
||||
|
||||
$(window).on('load', function(){ // When window loads
|
||||
change_comments();
|
||||
});
|
||||
alert("Github");
|
1
src/lib/jquery.js
vendored
1
src/lib/jquery.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"sites": [
|
||||
{"*.facebook.com":"facebook.js"}
|
||||
{"*.facebook.com":"facebook.js"},
|
||||
{"*.github.com":"github.js"}
|
||||
]
|
||||
}
|
Reference in a new issue