1
Fork 0

Corrected file names that made no sense

This commit is contained in:
Jake Howard 2015-08-28 15:00:39 +01:00
parent 2ff415aeab
commit 401ee44c7b
7 changed files with 23 additions and 21 deletions

View file

@ -28,5 +28,5 @@ with open('src/injector.js', "r") as file:
js_file = js_file.replace("%image_decoder%", image_decoder_json)
with open('build/injector.js', 'w') as file:
with open('build/global.js', 'w') as file:
file.write(js_file)

View file

@ -5,8 +5,8 @@ cp -r src/decoder.json build/
rm -rf build/injections/*
mkdir -p build/src/injections
uglifyjs build/injector.js --compress --screw-ie8 --define --keep-fnames -o build/injector.js
for f in src/injections/*; do uglifyjs "build/injector.js" "src/lib/jquery.js" $f --compress --screw-ie8 --define --stats --keep-fnames -o build/$f; done
uglifyjs "build/global.js" --compress --screw-ie8 --define --keep-fnames -o build/global.js
for f in src/injections/*; do uglifyjs "build/global.js" "src/lib/jquery.js" $f --compress --screw-ie8 --define --stats --keep-fnames -o build/$f; done
cp -rp build/src/* build/
rm -rf build/src

View file

@ -32,7 +32,7 @@ for site in site_decoder:
site = list(site.items())[0]
temp = {}
temp['matches'] = ["*://" + site[0] + '/*']
temp['js'] = ['data/lib/jquery.js', 'data/injector.js', 'data/injections/' + site[1]]
temp['js'] = ['data/injections/' + site[1]]
content_scripts.append(temp)

View file

@ -1,4 +1,4 @@
function inject_image(ident, classes) {
function insert_emoticons(ident, classes) {
classes = classes || "";
$(ident).each(function() {
decoder = image_decoder.images;
@ -13,7 +13,7 @@ function inject_image(ident, classes) {
});
}
function markdown_injector(ident) {
function markdown_decoder(ident) {
decoder = image_decoder.images;
for (var i = 0; i < decoder.length; i++) {
raw_key = Object.keys(decoder[i]);

View file

@ -1,5 +1,5 @@
function change_chat_tabs() {
inject_image('._d97', 'emoticon');
inset_emoticons('._d97', 'emoticon');
}
$('.fbNubFlyout').on('DOMNodeInserted DOMNodeRemoved change load', change_chat_tabs);
@ -10,4 +10,6 @@ $('.fbNub').on('click', change_chat_tabs);
$('._55ln').on('click', change_chat_tabs);
$(document).on('ready', function() {
change_chat_tabs();
});

View file

@ -1,13 +1,13 @@
function change_comments() {
inject_image('.comment-body');
insert_emoticons('.comment-body');
}
function change_readme() {
inject_image('#readme');
insert_emoticons('#readme');
}
function change_wiki() {
inject_image('#wiki-body');
insert_emoticons('#wiki-body');
}
$('.js-comment-container').on('load change', change_comments);
@ -15,7 +15,7 @@ $('.js-comment-container').on('load change', change_comments);
$('#readme').on('load change', change_readme);
$('form .timeline-comment textarea[placeholder="Leave a comment"]').on('change input', function() {
markdown_injector('form .timeline-comment textarea[placeholder="Leave a comment"]');
markdown_decoder('form .timeline-comment textarea[placeholder="Leave a comment"]');
});
$(document).on('ready', function() {

View file

@ -1,15 +1,15 @@
function change_card_title() {
inject_image('.list-card-title');
inject_image('.window-title-text');
insert_emoticons('.list-card-title');
insert_emoticons('.window-title-text');
}
function change_list_title() {
inject_image('.list-header-name');
inject_image('.window-header-inline-content');
insert_emoticons('.list-header-name');
insert_emoticons('.window-header-inline-content');
}
function change_comment() {
inject_image('.action-comment');
insert_emoticons('.action-comment');
}
$('.list-header-name').on('change load', function() {
@ -23,7 +23,7 @@ $('.active-card').on('click', function() {
});
$('.card-detail-edit textarea').on('change input', function() {
markdown_injector('.card-detail-edit textarea');
markdown_decoder('.card-detail-edit textarea');
});
$('.phenom-action').on('DOMNodeInserted DOMNodeRemoved change load', function() {