From f48a1ec05ce7d5b2e2e3ec88f60b8381d6c2da15 Mon Sep 17 00:00:00 2001 From: JrainLau Date: Fri, 10 May 2019 16:43:58 +0800 Subject: [PATCH] fix: fix bugs --- README.md | 4 ++-- package.json | 2 +- picee/js/main.js | 28 ++++++++++++++++++++++++++++ picee/manifest.json | 2 +- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 728e1bf..f7acdfa 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ Install from Chrome webstore: [Picee](https://chrome.google.com/webstore/detail/ ## Installation for developer 1. Go to [chrome://extensions](chrome://extensions). 2. Turn on "Development mode" on the top right. -3. Drag [picee.crx](https://github.com/jrainlau/picee/releases/download/1.4.0/picee.crx) into the page. +3. Drag [picee.crx](https://github.com/jrainlau/picee/releases/download/1.4.1/picee.crx) into the page. 4. Done. -> PS: If Chrome tells you that **Picee** was unsafety, you can unzip [picee.zip](https://github.com/jrainlau/picee/releases/download/1.4.0/picee.zip), and install it by "install unzip extentions" from the top left. +> PS: If Chrome tells you that **Picee** was unsafety, you can unzip [picee.zip](https://github.com/jrainlau/picee/releases/download/1.4.1/picee.zip), and install it by "install unzip extentions" from the top left. ## Usage diff --git a/package.json b/package.json index b27b4fc..db87273 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "picee", - "version": "1.4.0", + "version": "1.4.1", "description": "Using github as your image hosting service", "repository": { "type": "git", diff --git a/picee/js/main.js b/picee/js/main.js index 7609c08..b7468bb 100644 --- a/picee/js/main.js +++ b/picee/js/main.js @@ -80,6 +80,20 @@ new Vue({ if (uploadHistory) { this.uploadHistory = JSON.parse(uploadHistory) } + + const copyAsMarkdown = localStorage.getItem('picee_copy_as_markdown') + if (copyAsMarkdown) { + this.copyAsMarkdown = true + } else { + this.copyAsMarkdown = false + } + + const renameWithHash = localStorage.getItem('picee_rename_with_hash') + if (renameWithHash) { + this.renameWithHash = true + } else { + this.renameWithHash = false + } }, watch: { autoUpload (val) { @@ -101,6 +115,20 @@ new Vue({ this.compressSize = val localStorage.setItem('picee_compress_size', val) } + }, + copyAsMarkdown (val) { + if (val) { + localStorage.setItem('picee_copy_as_markdown', true) + } else { + localStorage.removeItem('picee_copy_as_markdown') + } + }, + renameWithHash (val) { + if (val) { + localStorage.setItem('picee_rename_with_hash', true) + } else { + localStorage.removeItem('picee_rename_with_hash') + } } }, methods: { diff --git a/picee/manifest.json b/picee/manifest.json index 14589e7..14b1cf3 100644 --- a/picee/manifest.json +++ b/picee/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Picee", - "version": "1.4.0", + "version": "1.4.1", "description": "Using github as your image hosting service", "homepage_url": "https://github.com/jrainlau/picee", "icons": {