From b597edee75f42802f3bdf5325cc05c4e582bac8b Mon Sep 17 00:00:00 2001 From: Mayhem Date: Wed, 1 May 2013 20:27:04 +0200 Subject: [PATCH 1/2] Link to the list of known conflicting extensions. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5e386b1ee..8108da2b8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ Reporting bugs: 1. Make sure both your **browser** and **4chan X** are up to date. -2. Disable your other extensions & scripts to identify conflicts. +2. Disable your other extensions & scripts to identify [conflicts](https://github.com/MayhemYDG/4chan-x/wiki/FAQ#known-conflicting-extensions). 3. If your issue persists, open a [new issue](https://github.com/MayhemYDG/4chan-x/issues) with the following information: 1. Precise steps to reproduce the problem, with the expected and actual results. 2. Console errors, if any. From f81fafb375c2bb2fdfb7cf0b8147109924edcc87 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Wed, 1 May 2013 21:54:12 +0200 Subject: [PATCH 2/2] No need to keep these in memory. --- src/Posting/QR.coffee | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 41385e3cf..b0e25f14a 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -135,20 +135,21 @@ QR = status.disabled = disabled or false persona: - name: [] - email: [] - sub: [] pwd: '' always: {} init: -> QR.persona.getPassword() $.get 'QR.personas', Conf['QR.personas'], ({'QR.personas': personas}) -> + types = + name: [] + email: [] + sub: [] for item in personas.split '\n' - QR.persona.parseItem item.trim() - for type in ['name', 'email', 'sub'] - QR.persona.loadPersonas type + QR.persona.parseItem item.trim(), types + for type, arr of types + QR.persona.loadPersonas type, arr return - parseItem: (item) -> + parseItem: (item, types) -> return if item[0] is '#' return unless match = item.match /(name|email|subject|password):"(.*)"/i [match, type, val] = match @@ -169,11 +170,11 @@ QR = if /always/i.test item QR.persona.always[type] = val - unless val in QR.persona[type] - QR.persona[type].push val - loadPersonas: (type) -> + unless val in types[type] + types[type].push val + loadPersonas: (type, arr) -> list = $ "#list-#{type}", QR.nodes.el - for val in QR.persona[type] + for val in arr $.add list, $.el 'option', textContent: val return