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

Display the version even for rulesets that are bundled with the exten… #17553

Merged
merged 2 commits into from Mar 11, 2019

Conversation

Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
@Hainish
Copy link
Member

@Hainish Hainish commented Mar 7, 2019

…sion to avoid confusion

@Hainish Hainish requested review from cschanaj and zoracon Mar 7, 2019
rulesets_versions.addSpan = function(update_channel_name, ruleset_version_string) {
let timestamp_span = document.createElement("span");
timestamp_span.className = "rulesets-version";
timestamp_span.innerText = chrome.i18n.getMessage("about_rulesets_version") + " " + update_channel_name + ": " + ruleset_version_string;
Copy link
Collaborator

@pipboy96 pipboy96 Mar 8, 2019

timestamp_span.innerText = `${chrome.i18n.getMessage("about_rulesets_version")} ${update_channel_name}: ${ruleset_version_string}`

Copy link
Collaborator

@cschanaj cschanaj left a comment

👍

sendMessage("get_ruleset_timestamps", null, timestamps => {
let replace = timestamps.reduce((reduced, [update_channel, timestamp]) => {
Copy link
Collaborator

@cschanaj cschanaj Mar 9, 2019

I think the replace here is the same as the replaces in de97a00#diff-893c26ee11675d91a6893982afc0f38aR217, it would be a bit more consistent to use replaces with s

let replaces = timestamps.some(([update_channel, timestamp]) => {
   return update_channel.replaces_default_rulesets && timestamp > 0;
});

EDIT: updated as per @pipboy96 's comment

Copy link
Collaborator

@pipboy96 pipboy96 Mar 9, 2019

@cschanaj You need parenthesis around [update_channel, timestamp].

Copy link
Collaborator

@pipboy96 pipboy96 Mar 9, 2019

@cschanaj Also no need of return:

let replaces = timestamps.some(([update_channel, timestamp]) => 
  update_channel.replaces_default_rulesets && timestamp > 0);

Copy link
Contributor

@zoracon zoracon left a comment

lgtm

@zoracon zoracon merged commit 83642b8 into EFForg:master Mar 11, 2019
1 check passed
@Hainish Hainish deleted the display-bundled-rulesets-version branch Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment