summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-07-07 16:12:21 -0400
committerJules Laplace <jules@okfoc.us>2015-07-07 16:12:21 -0400
commitafbf7d2707cd772258e6faca549f55f32377e6a9 (patch)
tree68f0b57da8b6c9b0f503ef81c1d8cdab04463746 /js
parent4dc0fac960b835cb9bd9bcc9f4b600a6201e245c (diff)
fix slash
Diffstat (limited to 'js')
-rw-r--r--js/clipboard.js17
-rw-r--r--js/tool.js5
2 files changed, 12 insertions, 10 deletions
diff --git a/js/clipboard.js b/js/clipboard.js
index 943aef3..bcbfdff 100644
--- a/js/clipboard.js
+++ b/js/clipboard.js
@@ -121,12 +121,13 @@ var clipboard = (function () {
// turn irssi style into mirc style
if (data.match(irssi_style_regex)){
data = data.replace(/\\x03/gm, '\x03')
- data = data.replace(/\\n/gm, '\n')
- data = data.replace(/\\`/gm, '`')
- data = data.replace(/\\"/gm, '"')
- data = data.replace(/\\\$/gm, '$')
- data = data.replace(irssi_style_regex, '')
- data = data.replace(/"\s*$/, '')
+ .replace(/\\x5C/g, '\\')
+ .replace(/\\n/gm, '\n')
+ .replace(/\\`/gm, '`')
+ .replace(/\\"/gm, '"')
+ .replace(/\\\$/gm, '$')
+ .replace(irssi_style_regex, '')
+ .replace(/"\s*$/, '')
}
// not a colorcode
@@ -135,8 +136,8 @@ var clipboard = (function () {
var json = colorcode_to_json(data)
- canvas_width_el.innerHTML = json.w
- canvas_height_el.innerHTML = json.h
+ canvas_width_el.innerHTML = json.w
+ canvas_height_el.innerHTML = json.h
canvas.resize(json.w, json.h)
canvas.clear()
diff --git a/js/tool.js b/js/tool.js
index 3e09c1d..9404b1c 100644
--- a/js/tool.js
+++ b/js/tool.js
@@ -25,8 +25,9 @@ var Tool = Model({
var Checkbox = Tool.extend({
init: function (span){
this.__init(span)
- var state = this.name[0] == "x"
- this.name = this.name.replace(/^[x_] /,"")
+ var name = this.name.replace(/^[x_] /,"")
+ var state = localStorage.getItem("ascii." + name) || this.name[0] == "x"
+ this.name = name
this.update(state)
},
update: function(state){