From 79b064718f7dd23ab391fa79736eb256f67c079b Mon Sep 17 00:00:00 2001 From: Ivan Gualandri Date: Mon, 29 Feb 2016 15:43:11 +0000 Subject: [PATCH 1/4] Update credits. Add unescape while showing parameter value (as requested in issue #46) --- src/popup.js | 14 +++++++------- src/post_update.html | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/popup.js b/src/popup.js index e762013..f547e01 100755 --- a/src/popup.js +++ b/src/popup.js @@ -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"); @@ -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]); diff --git a/src/post_update.html b/src/post_update.html index 129634b..2bec9a7 100644 --- a/src/post_update.html +++ b/src/post_update.html @@ -34,5 +34,9 @@

Credits:

  • Davide Fiorentino - Graphic Content
  • Jader Dias - Contributor
  • +

    Special thanks:

    + From 4e68b36cd39e7ae18e661f244911108cf7feed7f Mon Sep 17 00:00:00 2001 From: Ivan Gualandri Date: Mon, 29 Feb 2016 15:56:14 +0000 Subject: [PATCH 2/4] add escape to url update. As requested in #46 --- src/popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/popup.js b/src/popup.js index f547e01..e183ddc 100755 --- a/src/popup.js +++ b/src/popup.js @@ -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 Date: Tue, 1 Mar 2016 00:06:54 +0000 Subject: [PATCH 3/4] Update version number. Update post_update.html --- manifest.json | 2 +- src/post_update.html | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index f4787cc..54b37de 100755 --- a/manifest.json +++ b/manifest.json @@ -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 ", diff --git a/src/post_update.html b/src/post_update.html index 2bec9a7..9c28b04 100644 --- a/src/post_update.html +++ b/src/post_update.html @@ -12,12 +12,10 @@

    Parameters Editor has been updated.

    Changelog

    - New in version 1.3 + New in version 1.4
      -
    • Fix bug #42 - Error on add new parameter
    • -
    • Fix bug #39 - Fix bug where empty parameter was being replaced by "undefined"
    • -
    • Input fields are larger and better aligned (by JaderDias)
    • -
    • Fix html code on post_update.html
    • +
    • Add unescape and escape of parameters value
    • +
    • Bug fix in CSV export

    Source code

    This extension is Open Source, released under GPLv3. You can download sources from GitHub From d3d70844a293d040c15f8c720f949eff6eb09796 Mon Sep 17 00:00:00 2001 From: Ivan Gualandri Date: Mon, 7 Mar 2016 23:23:25 +0000 Subject: [PATCH 4/4] Fix issue #45 Export csv add a weird line. --- src/popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/popup.js b/src/popup.js index e183ddc..e680f97 100755 --- a/src/popup.js +++ b/src/popup.js @@ -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