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

Build 0.0.17 #61

Merged
merged 3 commits into from
Feb 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions builds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Update the version on `manifest.json`:
```json
"version": "0.0.16"
"version": "0.0.17"
```

Copy all folders and files to the `builds/current/` directory.
Expand Down Expand Up @@ -55,7 +55,7 @@ injections_controller(function() {
* Disclaimer for reviewers:
*
* The non-minified version for the code below is available at:
* https://github.com/gbaptista/luminous/blob/0.0.16/js/content/interceptor.js
* https://github.com/gbaptista/luminous/blob/0.0.17/js/content/interceptor.js
*
* This version was generated with the uglifyjs project
* from the following command:
Expand Down Expand Up @@ -99,11 +99,11 @@ Test the current build at least in these 4 browsers:
- *Mozilla Firefox*
- *Opera*

Compress the `builds/current/` content to a *.zip* file with the version: `0-0-16.zip` and contact the repository owner to publish in all stores.
Compress the `builds/current/` content to a *.zip* file with the version: `0-0-17.zip` and contact the repository owner to publish in all stores.

Include this note for reviewers:
```
The non-minified version for the code in "js/content/injections/interceptor.js" is available at: https://github.com/gbaptista/luminous/blob/0.0.16/js/content/interceptor.js
The non-minified version for the code in "js/content/injections/interceptor.js" is available at: https://github.com/gbaptista/luminous/blob/0.0.17/js/content/interceptor.js

This version was generated with the uglifyjs project from the following command:
> uglifyjs -c -m -- js/content/interceptor.js
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion html/interface-sample.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div id="loading">loading...</div>
<div id="options-container"><form class="options-form">
<div class="col-2">
<a href="https://github.com/gbaptista/luminous/releases/tag/0.0.16" id="version" target="_blank">0.0.16</a>
<a href="https://github.com/gbaptista/luminous/releases/tag/0.0.17" id="version" target="_blank">0.0.17</a>
<a href="https://gbaptista.github.io/luminous/doc/en-US" id="help-link" class="top-link" target="_blank">help</a>
<a href="../settings/injection/enabled.html" id="settings-link" class="top-link" target="_blank">settings</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion html/popup/templates/options.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form class="options-form">
<div class="col-2 col-2-header">
<a href="https://github.com/gbaptista/luminous/releases/tag/0.0.16" id="version" target="_blank">0.0.16</a>
<a href="https://github.com/gbaptista/luminous/releases/tag/0.0.17" id="version" target="_blank">0.0.17</a>
<a href=" " id="help-link" class="top-link" target="_blank"></a>
<a href="../settings/injection/enabled.html" id="settings-link" class="top-link" target="_blank"></a>
</div>
Expand Down
5 changes: 5 additions & 0 deletions js/background/headers_and_options_listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,14 @@ var settings_for_url = function(url, compressed) {

chrome.webNavigation.onCommitted.addListener(function(details) {
if(settings_defined) {
var a_element = document.createElement('a');
a_element.href = details.url;
var domain = a_element.hostname;

chrome.tabs.sendMessage(
details.tabId, {
action: 'options_from_on_committed',
domain: domain,
options: full_options_for_url(details.url)
}
);
Expand Down
12 changes: 8 additions & 4 deletions js/content/injections/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,24 @@ injections_controller(function() {
});

chrome.runtime.onMessage.addListener(function(message, _sender, _sendResponse) {
if(message.action == 'options_from_on_committed') {
if(
message.action == 'options_from_on_committed'
&&
window.location.host == message.domain
) {
debug_log('----------------------------------------------------');
debug_log('onCommitted: ' + (performance.now() - start_time));
debug_log(JSON.stringify(message .options));
debug_log(JSON.stringify(message.options));

inject_options_for_domain(message.options, 'onCommitted');
}
});

var load_options_for_domain = function(domain) {
chrome.storage.sync.get(null, function(sync_data) {
sync_data = apply_settings_for_domain(sync_data);
sync_data = apply_settings_for_domain(sync_data, domain);

var options = {}
var options = {};

options['disabled'] = sync_data['disabled_' + domain];
options['injection_disabled'] = (
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "__MSG_manifestName__",
"short_name": "Luminous",
"description": "__MSG_manifestDescription__",
"version": "0.0.16",
"version": "0.0.17",
"author": "Guilherme Baptista",
"developer": {
"name": "Guilherme Baptista",
Expand Down