From 2592fc8ed0cdc8784bde2498317920391533016b Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 1 Apr 2013 20:12:39 +0200 Subject: [PATCH 1/2] Fix #978. It's magic! No need to unescape. --- 4chan_x.user.js | 2 +- changelog | 2 ++ script.coffee | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index c0bdc8909..a1b2fe635 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3046,7 +3046,7 @@ reader.onload = function(e) { var data, err; try { - data = JSON.parse(decodeURIComponent(escape(e.target.result))); + data = JSON.parse(e.target.result); Options.loadSettings(data); if (confirm('Import successful. Refresh now?')) { return window.location.reload(); diff --git a/changelog b/changelog index 152109283..2c112b37f 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- Mayhem + Fix importing settings containing unicode characters. 2.39.1 - Mayhem diff --git a/script.coffee b/script.coffee index 76c722933..431aee8b6 100644 --- a/script.coffee +++ b/script.coffee @@ -2465,7 +2465,7 @@ Options = reader = new FileReader() reader.onload = (e) -> try - data = JSON.parse decodeURIComponent escape e.target.result + data = JSON.parse e.target.result Options.loadSettings data if confirm 'Import successful. Refresh now?' window.location.reload() From b5a3de3395991dd7ca09445c6b369ac0d101f092 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 1 Apr 2013 20:14:22 +0200 Subject: [PATCH 2/2] Release 2.39.2. --- 4chan_x.user.js | 6 +++--- Cakefile | 2 +- changelog | 2 ++ latest.js | 2 +- script.coffee | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index a1b2fe635..456ed5db7 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan x -// @version 2.39.1 +// @version 2.39.2 // @namespace aeosynth // @description Adds various features. // @copyright 2009-2011 James Campos @@ -27,7 +27,7 @@ * Copyright (c) 2009-2011 James Campos * Copyright (c) 2012-2013 Nicolas Stepien * http://mayhemydg.github.com/4chan-x/ - * 4chan X 2.39.1 + * 4chan X 2.39.2 * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -5811,7 +5811,7 @@ return $.globalEval(("(" + code + ")()").replace('_id_', bq.id)); }, namespace: '4chan_x.', - version: '2.39.1', + version: '2.39.2', callbacks: [], css: '\ /* dialog styling */\ diff --git a/Cakefile b/Cakefile index 224342336..94ad020ee 100644 --- a/Cakefile +++ b/Cakefile @@ -2,7 +2,7 @@ {exec} = require 'child_process' fs = require 'fs' -VERSION = '2.39.1' +VERSION = '2.39.2' HEADER = """ // ==UserScript== diff --git a/changelog b/changelog index 2c112b37f..66c5e5205 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master + +2.39.2 - Mayhem Fix importing settings containing unicode characters. diff --git a/latest.js b/latest.js index 213c063d1..bb4c76a77 100644 --- a/latest.js +++ b/latest.js @@ -1 +1 @@ -postMessage({version:'2.39.1'},'*') \ No newline at end of file +postMessage({version:'2.39.2'},'*') \ No newline at end of file diff --git a/script.coffee b/script.coffee index 431aee8b6..225c70bbc 100644 --- a/script.coffee +++ b/script.coffee @@ -4722,7 +4722,7 @@ Main = $.globalEval "(#{code})()".replace '_id_', bq.id namespace: '4chan_x.' - version: '2.39.1' + version: '2.39.2' callbacks: [] css: ' /* dialog styling */