Skip to content

Commit

Permalink
Version 1.9.3
Browse files Browse the repository at this point in the history
- Fixed major bug
  • Loading branch information
WaldiPL committed Aug 4, 2019
1 parent 219e9cc commit c8ce735
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/changelog.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"use strict";

let changelog=`[
{"version":"1.9.3",
"changes":["Fixed major bug"],
"changesPL":["Naprawiono poważny błąd"]
},
{"version":"1.9.2",
"changes":["Added possibility to hide changes outside the scanned element #35 #41","Fixed bugs","Minor changes"],
"changesPL":["Dodano możliwość ukrycia zmian poza skanowanym elementem #35 #41","Naprawiono błędy","Drobne zmiany"]
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "1.9.2",
"version": "1.9.3",
"default_locale": "en",
"icons": {
"48": "icons/icon.svg",
Expand Down
12 changes: 7 additions & 5 deletions src/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function load(type,inspectMode){
case "light":
doc=parser.parseFromString(light,"text/html");
let style=document.createElement("style");
let cssSelector=(settings.highlightOutsideChanges)?"":sId.cssSelector;
let cssSelector=(!settings.highlightOutsideChanges&&sId.paritialMode&&sId.cssSelector)?sId.cssSelector:"";
style.textContent=`
${cssSelector} .__wps_changes a{
background:#ffa !important;
Expand Down Expand Up @@ -310,11 +310,13 @@ function load(type,inspectMode){
}else{
filteredChanges=allChanges;
}
if(!settings.highlightOutsideChanges){
if(!settings.highlightOutsideChanges&&sId.paritialMode&&sId.cssSelector){
let selectedElement=iframe.contentDocument.querySelector(sId.cssSelector);
filteredChanges=[...filteredChanges].filter((element,index,array)=>{
return (selectedElement.contains(element));
});
if(selectedElement){
filteredChanges=[...filteredChanges].filter((element,index,array)=>{
return (selectedElement.contains(element));
});
}
}
document.getElementById("xtext").textContent=i18n("numberOfChanges",filteredChanges.length);
}
Expand Down

0 comments on commit c8ce735

Please sign in to comment.