From d3087861271eb1c98ffc499209a86d516fc55af5 Mon Sep 17 00:00:00 2001 From: Nokita Kaze Date: Sun, 16 Nov 2014 16:26:05 +0300 Subject: [PATCH] =?UTF-8?q?*=20=D0=9F=D0=BE=D0=B4=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D0=B5=D1=81=D1=8C=20=D1=81=D0=B2=D0=BE=D0=B8=D0=BC=20Json'?= =?UTF-8?q?=D0=BE=D0=BC,=20=D0=90=D1=8F=D0=BA=D1=81=D0=BE=D0=BC=20=D0=B8?= =?UTF-8?q?=20=D0=BA=D1=80=D0=BE=D1=81=D1=81-=D1=81=D0=B0=D0=B9=D1=82?= =?UTF-8?q?=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chrome_point_plus/js/bquery_ajax.js | 12 +++++++++--- chrome_point_plus/js/point-plus.js | 2 ++ chrome_point_plus/manifest.json | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/chrome_point_plus/js/bquery_ajax.js b/chrome_point_plus/js/bquery_ajax.js index 44f1c8d..553c39c 100644 --- a/chrome_point_plus/js/bquery_ajax.js +++ b/chrome_point_plus/js/bquery_ajax.js @@ -4,7 +4,10 @@ function $ajax_prot(settings){ if (settings['async'] !==undefined){this.async =settings['async'];} if (settings['type'] !==undefined){this.type =settings['type'];} if (settings['postdata']!==undefined){this.postdata=settings['postdata'];} - + if (settings['dont_set_content_type']!==undefined){ + this.dont_set_content_type=settings['dont_set_content_type']; + } + this.xhr=new XMLHttpRequest(); this.xhr.parent =this; this.xhr.settings=settings; @@ -12,7 +15,9 @@ function $ajax_prot(settings){ this.xhr.error =settings['error']; this.xhr.onreadystatechange=this.change; this.xhr.open(this.type, this.url, this.async); - if (this.type=='POST'){this.xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');} + if ((this.type=='POST')&& !this.dont_set_content_type){ + this.xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + } if (settings.headers!==undefined){ for (var i=0;i