From b72e21d1435226c909492fd55b3ad730af9546b5 Mon Sep 17 00:00:00 2001
From: Boy
Date: Fri, 31 May 2019 23:11:27 +0800
Subject: [PATCH 1/3] update
---
README.md | 52 ++++++---------------
package.json | 10 ++--
webview/._index.html | Bin 0 -> 4096 bytes
webview/index.html | 108 ++++++++++++++++++++++++++++---------------
webview/index.js | 10 ++--
5 files changed, 96 insertions(+), 84 deletions(-)
create mode 100644 webview/._index.html
diff --git a/README.md b/README.md
index fe67197..ebf9628 100644
--- a/README.md
+++ b/README.md
@@ -1,52 +1,30 @@
-
Polacode — Polaroid for your code 📸
+ Polacode - 44886 — 基于polacode的一款vscode截图工具 📸

-## Why?
+## 为什么要修改原版?
-You have spent countless hours finding the perfect [JavaScript grammar](https://marketplace.visualstudio.com/search?term=javascript%20grammar&target=VSCode&category=All%20categories&sortBy=Relevance), matching it with a [sleek-looking VS Code theme](https://marketplace.visualstudio.com/search?target=VSCode&category=Themes&sortBy=Downloads), trying out all the [best programming fonts](https://www.slant.co/topics/67/~best-programming-fonts).
+因为,原版功能太少了!
-You take three days porting over [your theme](https://github.com/wesbos/cobalt2-vscode) before starting to use VS Code.
-You shell out $200 for [italic cursive html attributes](https://www.typography.com/blog/introducing-operator).
+## 改了些什么?
-The code has to look right.
+- 原版布局全是用的flex,我不知道这是为何,想要拓展真的很不方便,我把外层全部改为了普通的布局
+- 原版没有苹果装逼的左上角三点,这怎么能行?我加了苹果左上角控制三点
+- 原版如果你是用remote开发,那么这个插件就只能运行在ssh,但那样生成的截图就不能保存在本地,这是什么玩意?我在我电脑上截图,结果截的图放在服务器上?我怎么用?
-## Tips
+## 怎么用?
+- 按下你键盘的F1,然后搜索 44886 ,就能看到 `polacode - 44886` ,嗯,点击它!
+- 这时,会出来一个新窗口在右边
+- 在左边用鼠标框选你想截图的代码,右边就自动复制过去啦!
+- 你现在可以用电脑自带的截图来截右边的代码,也可以点下方的照相按钮来生成图片。
-- Resize the snippet / container by dragging the lowerright corner
-- Use `polacode.target`, `polacode.shadow`, `polacode.transparentBackground` and `polacode.backgroundColor` to control image appearance
+## 下一步要改什么?
+- 要增加代码的行号
+- 还没相好……
-## Demo
-
-[Nord](https://github.com/arcticicestudio/nord-visual-studio-code) + [Input Mono](http://input.fontbureau.com)
-
-
-
-[Monokai Pro](https://marketplace.visualstudio.com/items?itemName=monokai.theme-monokai-pro-vscode) + [Operator Mono](https://www.typography.com/blog/introducing-operator)
-
-
-
-[Material Theme Palenight](https://marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-material-theme) + [Fira Code](https://github.com/tonsky/FiraCode)
-
-
-
-## Credit
-
-Thanks to [@tsayen](https://github.com/tsayen) for making [dom-to-image](https://github.com/tsayen/dom-to-image), which Polacode is using for generating the images.
-
-Thanks to [Dawn Labs](https://dawnlabs.io) for making [Carbon](https://carbon.now.sh) that inspired Polacode.
-
-Many color are taken from the elegant [Nord](https://github.com/arcticicestudio/nord) theme by [@arcticicestudio](https://github.com/arcticicestudio).
-
-Download button animation is made with [Vivus](https://github.com/maxwellito/vivus).
-
-## Contribution
-
-Contribution is not very welcome.
-Please open an issue first so I can stop you from complicating the UX.
## License
diff --git a/package.json b/package.json
index c03366f..0dcd82d 100644
--- a/package.json
+++ b/package.json
@@ -1,11 +1,11 @@
{
- "name": "polacode",
- "displayName": "Polacode",
- "description": "📸 Polaroid for your code",
+ "name": "polacode-44886",
+ "displayName": "Polacode-44886",
+ "description": "📸 Polaroid for your code. edit by 44886.",
"version": "0.3.2",
"repository": {
"type": "git",
- "url": "https://github.com/octref/polacode.git"
+ "url": "https://github.com/44886/polacode.git"
},
"publisher": "pnp",
"keywords": [
@@ -35,7 +35,7 @@
"commands": [
{
"command": "polacode.activate",
- "title": "Polacode 📸"
+ "title": "Polacode 📸 - 44886"
}
],
"configuration": {
diff --git a/webview/._index.html b/webview/._index.html
new file mode 100644
index 0000000000000000000000000000000000000000..6203ec3276f2efe2479fa3d057d0425b961becde
GIT binary patch
literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103v0xDsI
z=wMg?WDB5a0m{L|rIPb=^%4sTa#Hnj5{pYpi&Ill5=&B*1A;+%c=bNUfau)1bRuj9
zsT>8PAut*OqaiRF0;3@?8UmvsFd71*Aut*OqaiRF0wXm9K%Gqx1_QZ}jLc$%qSWI2
z(xT*4g|z&lY=z9clGMDC%>2B>oSaI9oYb@ug`}Lsylh}!7^-VXQ>gxjdqsvp?*D%P
DpI9jP
literal 0
HcmV?d00001
diff --git a/webview/index.html b/webview/index.html
index 65df1a8..56997de 100644
--- a/webview/index.html
+++ b/webview/index.html
@@ -1,44 +1,44 @@
+
- console.log('0. Run command \`Polacode ${cameraWithFlashEmoji}\`')
console.log('1. Copy some code')
console.log('2. Paste into Polacode view')
console.log('3. Click the button ${cameraWithFlashEmoji}')
`
+ return ``+`欢迎使用 44886. 为您提供的代码美化截图工具,打开本窗口后,请在左边代码窗口框选你要截图的部分,本窗口将自动复制你的代码样式,您再点击下方的按钮,即可截图。
`
}
const serializeBlob = (blob, cb) => {
@@ -129,13 +130,14 @@
obturateur.addEventListener('click', () => {
if (target === 'container') {
- shootAll()
+ shootAll()
} else {
shootSnippet()
}
})
function shootAll() {
+ console.log(snippetContainerNode.offsetWidth);
const width = snippetContainerNode.offsetWidth * 2
const height = snippetContainerNode.offsetHeight * 2
const config = {
@@ -143,7 +145,7 @@
height,
style: {
transform: 'scale(2)',
- 'transform-origin': 'center',
+ 'transform-origin': '0% 0%',
background: getRgba(backgroundColor, transparentBackground)
}
}
From 81968c0312595b22c1c4761163ca9acb89189606 Mon Sep 17 00:00:00 2001
From: Boy