From 93362d112ad21eac218d04cd22aae8ba62cf28a9 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sun, 16 Nov 2014 06:01:31 +0400 Subject: [PATCH 1/5] SoundCloud embedding. New JS injecting method. --- chrome_point_plus/js/background.js | 8 +- chrome_point_plus/js/options.js | 61 ++++---- chrome_point_plus/js/point-plus.js | 33 +++++ .../js/soundcloud/soundcloud.player.api.js | 140 ++++++++++++++++++ chrome_point_plus/manifest.json | 4 +- chrome_point_plus/options.html | 6 +- 6 files changed, 219 insertions(+), 33 deletions(-) create mode 100644 chrome_point_plus/js/soundcloud/soundcloud.player.api.js diff --git a/chrome_point_plus/js/background.js b/chrome_point_plus/js/background.js index a9d4897..f8b3902 100644 --- a/chrome_point_plus/js/background.js +++ b/chrome_point_plus/js/background.js @@ -22,8 +22,12 @@ chrome.extension.onMessage.addListener(function(message, sender) { )); break; - case 'injectJS': - + case 'injectJSFile': + console.log('Injecting JS: %s', message.file); + chrome.tabs.executeScript(null, { + file: message.file + //,runAt: 'document_end' + }); break; case 'injectCSSFile': diff --git a/chrome_point_plus/js/options.js b/chrome_point_plus/js/options.js index 429abe9..9ec456d 100644 --- a/chrome_point_plus/js/options.js +++ b/chrome_point_plus/js/options.js @@ -19,6 +19,9 @@ var ppOptions = [ 'option_images_load_booru', // Wrap WEBM videos into the