Skip to content

Commit

Permalink
Merge pull request #48 from inuyasha82/master
Browse files Browse the repository at this point in the history
Master for release
  • Loading branch information
inuyasha82 committed Mar 7, 2016
2 parents ce1ddb9 + 63219db commit 8c9375b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Parameters Editor",
"version": "1.3",
"version": "1.4",

"description": "Shows parameters used in the URL and allows to update, export and import them ",

Expand Down
18 changes: 9 additions & 9 deletions src/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ function add_new_parameter(){
parameter_name_container.setAttribute("type", "text");
parameter_value_container.addEventListener("keypress", input_keypress);
parameter_name_container.onblur = function(){
console.log(this);
console.log(this);
if(this.value!=""){
//var element = this.nextElementSibling;
var element = this.parentElement.parentElement.childNodes[1].childNodes[0];
var element = this.parentElement.parentElement.childNodes[1].childNodes[0];
element.setAttribute("id", this.value);
var new_label = document.createElement("input");
//new_label.appendChild(document.createTextNode(this.value));
new_label.className = "parameter_name";
new_label.disabled = true;
new_label.value = this.value;
new_label.className = "parameter_name";
new_label.disabled = true;
new_label.value = this.value;
//element.parentElement.replaceChild(new_label, this);
element.parentElement.childNodes[0].replaceChild(new_label, this);
element.parentElement.childNodes[0].replaceChild(new_label, this);
}
};
parameter_value_container.setAttribute("type", "text");
Expand Down Expand Up @@ -110,7 +110,7 @@ function create_updated_url(url){
continue;
}

new_url = new_url + parameters[i].id + "=" + parameters[i].value;
new_url = new_url + parameters[i].id + "=" + escape(parameters[i].value);
if(i<parameters.length-1){
new_url = new_url + "&";
}
Expand Down Expand Up @@ -216,7 +216,7 @@ function showParameter(parameter, after_hash){
var text_input_element = document.createElement("input");
text_input_element.type = "text";
if(parameter_array[1] !== undefined) {
text_input_element.value = parameter_array[1];
text_input_element.value = unescape(parameter_array[1]);
}

text_input_element.setAttribute("id", parameter_array[0]);
Expand Down Expand Up @@ -250,7 +250,7 @@ function delete_parameter(){
function export_parameters_list(format){
console.log("Placeholder");
var container_div = document.getElementById("container");
var parameters = container_div.getElementsByTagName("input");
var parameters = container_div.getElementsByClassName("parameter_value");
var parameters_array = new Array();
for(i=0; i<parameters.length; i++){
console.log(parameters[i].getAttribute("id"));
Expand Down
12 changes: 7 additions & 5 deletions src/post_update.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
<div id="container">
<h1><img src="../images/icon.png" height="80" width="80">Parameters Editor has been updated.</h1>
<h2>Changelog</h2>
New in version 1.3
New in version 1.4
<ul>
<li>Fix bug #42 - Error on add new parameter</li>
<li>Fix bug #39 - Fix bug where empty parameter was being replaced by "undefined" </li>
<li>Input fields are larger and better aligned (by JaderDias)</li>
<li>Fix html code on post_update.html</li>
<li>Add unescape and escape of parameters value</li>
<li>Bug fix in CSV export</li>
</ul>
<h2>Source code</h2>
This extension is Open Source, released under GPLv3. You can download sources from <a href="http://c103.github.io/chrome_parameters/">GitHub</a>
Expand All @@ -34,5 +32,9 @@ <h2>Credits:</h2>
<li>Davide Fiorentino - Graphic Content</li>
<li>Jader Dias - Contributor</li>
</ul>
<h2>Special thanks:</h2>
<ul>
<li> Amit Kohli </li>
</ul>
</body>
</html>

0 comments on commit 8c9375b

Please sign in to comment.