From 04f37ef39bccf592471d46b0277052bb09528f2d Mon Sep 17 00:00:00 2001 From: Kazuhiro Hiramatsu Date: Mon, 1 Nov 2010 16:19:26 +0100 Subject: [PATCH 01/16] initial commit --- README | 12 + chrome.manifest | 8 + content/JSONPrettyPrint.css | 69 +++ content/XMLPrettyPrint.xsl | 132 +++++ content/about.xul | 42 ++ content/base64.js | 142 +++++ content/header.xul | 80 +++ content/json2xul.js | 159 ++++++ content/login.js | 161 ++++++ content/login.xul | 141 +++++ content/oauth.js | 515 ++++++++++++++++++ content/restclient.js | 487 +++++++++++++++++ content/restclient.xul | 148 +++++ content/restclientOverlay.js | 98 ++++ content/restclientOverlay.xul | 23 + content/sha1.js | 203 +++++++ content/tabcontroller.js | 42 ++ content/tablistener.js | 144 +++++ content/util.js | 216 ++++++++ install.rdf | 21 + locale/en-US/header.dtd | 7 + locale/en-US/login.dtd | 36 ++ locale/en-US/restclient.dtd | 36 ++ locale/en-US/restclient.properties | 2 + locale/fr-FR/header.dtd | 7 + locale/fr-FR/login.dtd | Bin 0 -> 2772 bytes locale/fr-FR/restclient.dtd | 36 ++ locale/fr-FR/restclient.properties | 2 + locale/zh-CN/header.dtd | 7 + locale/zh-CN/login.dtd | 36 ++ locale/zh-CN/restclient.dtd | 36 ++ locale/zh-CN/restclient.properties | 2 + skin/JSONPrettyPrint.css | 74 +++ skin/Thumbs.db | Bin 0 -> 16896 bytes skin/XMLPrettyPrint.css | 163 ++++++ skin/logo16.png | Bin 0 -> 629 bytes skin/logo24.png | Bin 0 -> 926 bytes skin/logo32.png | Bin 0 -> 1151 bytes skin/logo48.png | Bin 0 -> 1745 bytes skin/overlay.css | 11 + skin/restclient.css | 66 +++ skin/toolbar/icons/Thumbs.db | Bin 0 -> 12800 bytes skin/toolbar/icons/document-open.png | Bin 0 -> 1001 bytes skin/toolbar/icons/document-save.png | Bin 0 -> 1150 bytes skin/toolbar/icons/edit-clear.png | Bin 0 -> 1237 bytes skin/toolbar/icons/edit-copy.png | Bin 0 -> 725 bytes skin/toolbar/icons/list-add.png | Bin 0 -> 386 bytes skin/toolbar/icons/start-here.png | Bin 0 -> 932 bytes skin/toolbar/icons/system-log-out.png | Bin 0 -> 1084 bytes skin/toolbar/icons/view-refresh.png | Bin 0 -> 1364 bytes skin/toolbar/icons_disabled/Thumbs.db | Bin 0 -> 12288 bytes skin/toolbar/icons_disabled/document-open.png | Bin 0 -> 785 bytes skin/toolbar/icons_disabled/document-save.png | Bin 0 -> 855 bytes skin/toolbar/icons_disabled/edit-clear.png | Bin 0 -> 804 bytes skin/toolbar/icons_disabled/edit-copy.png | Bin 0 -> 725 bytes skin/toolbar/icons_disabled/list-add.png | Bin 0 -> 386 bytes skin/toolbar/icons_disabled/start-here.png | Bin 0 -> 718 bytes .../toolbar/icons_disabled/system-log-out.png | Bin 0 -> 839 bytes skin/toolbar/icons_disabled/view-refresh.png | Bin 0 -> 814 bytes 59 files changed, 3364 insertions(+) create mode 100644 README create mode 100644 chrome.manifest create mode 100644 content/JSONPrettyPrint.css create mode 100644 content/XMLPrettyPrint.xsl create mode 100644 content/about.xul create mode 100644 content/base64.js create mode 100644 content/header.xul create mode 100644 content/json2xul.js create mode 100644 content/login.js create mode 100644 content/login.xul create mode 100644 content/oauth.js create mode 100644 content/restclient.js create mode 100644 content/restclient.xul create mode 100644 content/restclientOverlay.js create mode 100644 content/restclientOverlay.xul create mode 100644 content/sha1.js create mode 100644 content/tabcontroller.js create mode 100644 content/tablistener.js create mode 100644 content/util.js create mode 100644 install.rdf create mode 100644 locale/en-US/header.dtd create mode 100644 locale/en-US/login.dtd create mode 100644 locale/en-US/restclient.dtd create mode 100644 locale/en-US/restclient.properties create mode 100644 locale/fr-FR/header.dtd create mode 100644 locale/fr-FR/login.dtd create mode 100644 locale/fr-FR/restclient.dtd create mode 100644 locale/fr-FR/restclient.properties create mode 100644 locale/zh-CN/header.dtd create mode 100644 locale/zh-CN/login.dtd create mode 100644 locale/zh-CN/restclient.dtd create mode 100644 locale/zh-CN/restclient.properties create mode 100644 skin/JSONPrettyPrint.css create mode 100644 skin/Thumbs.db create mode 100644 skin/XMLPrettyPrint.css create mode 100644 skin/logo16.png create mode 100644 skin/logo24.png create mode 100644 skin/logo32.png create mode 100644 skin/logo48.png create mode 100644 skin/overlay.css create mode 100644 skin/restclient.css create mode 100644 skin/toolbar/icons/Thumbs.db create mode 100644 skin/toolbar/icons/document-open.png create mode 100644 skin/toolbar/icons/document-save.png create mode 100644 skin/toolbar/icons/edit-clear.png create mode 100644 skin/toolbar/icons/edit-copy.png create mode 100644 skin/toolbar/icons/list-add.png create mode 100644 skin/toolbar/icons/start-here.png create mode 100644 skin/toolbar/icons/system-log-out.png create mode 100644 skin/toolbar/icons/view-refresh.png create mode 100644 skin/toolbar/icons_disabled/Thumbs.db create mode 100644 skin/toolbar/icons_disabled/document-open.png create mode 100644 skin/toolbar/icons_disabled/document-save.png create mode 100644 skin/toolbar/icons_disabled/edit-clear.png create mode 100644 skin/toolbar/icons_disabled/edit-copy.png create mode 100644 skin/toolbar/icons_disabled/list-add.png create mode 100644 skin/toolbar/icons_disabled/start-here.png create mode 100644 skin/toolbar/icons_disabled/system-log-out.png create mode 100644 skin/toolbar/icons_disabled/view-refresh.png diff --git a/README b/README new file mode 100644 index 0000000..02a0cc1 --- /dev/null +++ b/README @@ -0,0 +1,12 @@ += restclient-fx-patched + +Patched version of Firefox addon called RESTClient (https://addons.mozilla.org/en-US/firefox/addon/9780/) + +== changes +- field values recovering when Firefox crashes +- fixed header deleting (now you can use delete key when editing header name or value) +- fixed display of json data (I've just moved css file to right place) +- added ability to select and copy text from response (by adding right css style, that doesn't work always properly) + +== todo +- field values storing when Firefox is shutting down by user diff --git a/chrome.manifest b/chrome.manifest new file mode 100644 index 0000000..ae44e89 --- /dev/null +++ b/chrome.manifest @@ -0,0 +1,8 @@ +content restclient content/ +skin restclient classic/1.0 skin/ +locale restclient en-US locale/en-US/ +locale restclient fr-FR locale/fr-FR/ +locale restclient zh-CN locale/zh-CN/ + +overlay chrome://browser/content/browser.xul chrome://restclient/content/restclientOverlay.xul +style chrome://global/content/customizeToolbar.xul chrome://restclient/skin/overlay.css \ No newline at end of file diff --git a/content/JSONPrettyPrint.css b/content/JSONPrettyPrint.css new file mode 100644 index 0000000..647a2cd --- /dev/null +++ b/content/JSONPrettyPrint.css @@ -0,0 +1,69 @@ +/* The top-level container for all the formatted json or the error message if there is one */ +.json-content { + background-color: white; + border: 1px solid #999999; + margin-right: 10px; + padding: 10px 10px 10px 0; +} + +.json-string { + color: green; + white-space: pre; +} + +.json-null { + color: red; +} + +.json-numeric { + color: red; +} + +.json-bool { + color: blue; +} + +/* + An object or an array +*/ +.json-object { + padding-left: 10px; +} + +/* + A member of an array or object. + - a member of an array is just a value + - a member of an object is a name/value pair +*/ +.json-member { + padding-left: 10px; +} + +/* + The label, for example: + { + validated: true + ^^^^^^^^^ + } +*/ +.json-label { + font-weight: bold; +} + +/* + The braces for objects and arrays, ie {} or [] +*/ +.json-brace { + font-weight: bold; +} + +/* The part that says there was an error, eg "There was an error" */ +.json-error-title { + font-weight: bold; +} + +/* The actual error message, eg "Missing left bracket on line 6" */ +.json-error-message { + +} + diff --git a/content/XMLPrettyPrint.xsl b/content/XMLPrettyPrint.xsl new file mode 100644 index 0000000..ba8450e --- /dev/null +++ b/content/XMLPrettyPrint.xsl @@ -0,0 +1,132 @@ + + + + + + + + + + + + < + + + /> + + + + + + < + + + > + + + + </ + + > + + + + + + + + + < + + + > + + + + </ + + > + + + + + + + + + + = + + + " + # + attribute-href + setRequestUrl(''); + + " + + + "" + + + + + + + + + + + + + <? + + + + ?> + + + + + + + + + <? + + ?> + + + + + + + + <!-- + + --> + + + + + + + + + <!-- + + --> + + + + + + + + + + diff --git a/content/about.xul b/content/about.xul new file mode 100644 index 0000000..be52ef1 --- /dev/null +++ b/content/about.xul @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +