From 408618ecebb6b7919ccd306b56ccc4ca0ab1e6d3 Mon Sep 17 00:00:00 2001 From: caojiezi2003 <249085952@qq.com> Date: Sun, 4 Aug 2024 17:34:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AB=99=E7=82=B9=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chrome-app/manifest.json | 54 +++---- static/landing/gistshare.html | 264 +++++++++++++++---------------- static/landing/share.html | 282 +++++++++++++++++----------------- static/sitemap.xml | 6 +- 4 files changed, 307 insertions(+), 299 deletions(-) diff --git a/chrome-app/manifest.json b/chrome-app/manifest.json index afce6eed..e13b2cd3 100644 --- a/chrome-app/manifest.json +++ b/chrome-app/manifest.json @@ -1,28 +1,28 @@ { - "name": "StackEdit中文版", - "description": "支持Gitee仓库/粘贴图片自动上传的浏览器内 Markdown 编辑器", - "version": "5.15.17", - "manifest_version": 2, - "container" : "GITEE", - "api_console_project_id" : "241271498917", - "icons": { - "16": "icon-16.png", - "32": "icon-32.png", - "64": "icon-64.png", - "128": "icon-128.png", - "256": "icon-256.png", - "512": "icon-512.png" - }, - "app": { - "urls": [ - "https://stackedit.cn/" - ], - "launch": { - "web_url": "https://stackedit.cn/app" - } - }, - "offline_enabled": true, - "permissions": [ - "unlimitedStorage" - ] -} + "name": "StackEdit中文版", + "description": "支持Gitee仓库/粘贴图片自动上传的浏览器内 Markdown 编辑器", + "version": "5.15.17", + "manifest_version": 2, + "container": "GITEE", + "api_console_project_id": "241271498917", + "icons": { + "16": "icon-16.png", + "32": "icon-32.png", + "64": "icon-64.png", + "128": "icon-128.png", + "256": "icon-256.png", + "512": "icon-512.png" + }, + "app": { + "urls": [ + "https://md.jonylee.top/" + ], + "launch": { + "web_url": "https://md.jonylee.top/app" + } + }, + "offline_enabled": true, + "permissions": [ + "unlimitedStorage" + ] +} \ No newline at end of file diff --git a/static/landing/gistshare.html b/static/landing/gistshare.html index b1e6d1b8..70a5cbe9 100644 --- a/static/landing/gistshare.html +++ b/static/landing/gistshare.html @@ -1,165 +1,169 @@ + - 文章分享 - StackEdit中文版 - - - + 文章分享 - Markdown编辑器 + + + - + - + } + + const url = `https://api.github.com/gists/${gistId}`; + xhr.open('GET', url); + if (accessToken) { + xhr.setRequestHeader('Authorization', `Bearer ${accessToken}`); + } + xhr.onload = function() { + if (xhr.status === 200) { + const newdoc = document.implementation.createHTMLDocument(""); + const body = JSON.parse(xhr.responseText); + for (let key in body.files) { + newdoc.documentElement.innerHTML = body.files[key].content; + } + const currHead = document.head; + // head + appendTagHtml(newdoc, 'style', currHead); + // title + document.title = newdoc.title + ' - StackEdit中文版'; + // 内容 + const shareContent = document.getElementsByClassName('share-content')[0]; + shareContent.innerHTML = newdoc.body.innerHTML; + document.body.className = newdoc.body.className; + } else if (xhr.status === 403) { + const rateLimit = xhr.responseText && xhr.responseText.indexOf('Rate Limit') >= 0; + const appUri = `${window.location.protocol}//${window.location.host}/app`; + document.getElementById('div_info').innerHTML = `${rateLimit ? "请求太过频繁" : "无权限访问"},请使用GitHub登录 主文档空间 后再刷新此页面!`; + } else { + console.error('An error occurred: ' + xhr.status); + document.getElementById('div_info').innerHTML = `分享内容获取失败或已失效!请使用GitHub登录 主文档空间 后再刷新此页面!`; + } + }; + xhr.send(); + } + + -
- -
-
-
文章加载中......
-
+
+ +
+
+
文章加载中......
+
+ + - + + \ No newline at end of file diff --git a/static/landing/share.html b/static/landing/share.html index 9c4deb13..49e05f9b 100644 --- a/static/landing/share.html +++ b/static/landing/share.html @@ -1,177 +1,181 @@ + - 文章分享 - StackEdit中文版 - - - + 文章分享 - Markdown编辑器 + + + - + - + } + + }; + xhr.send(); + } + + -
- -
-
-
文章加载中......
-
+
+ +
+
+
文章加载中......
+
+ + - + + \ No newline at end of file diff --git a/static/sitemap.xml b/static/sitemap.xml index 45263361..09db96c9 100644 --- a/static/sitemap.xml +++ b/static/sitemap.xml @@ -1,12 +1,12 @@ - https://stackedit.cn/ + https://md.jonylee.top/ weekly 1.0 - https://stackedit.cn/app + https://md.jonylee.top/app weekly 1.0 @@ -16,7 +16,7 @@ 0.8 - https://stackedit.cn/privacy_policy.html + https://md.jonylee.top/privacy_policy.html monthly 0.6