mirror of
				https://github.com/Mabbs/mabbs.github.io
				synced 2025-10-31 09:19:43 +08:00 
			
		
		
		
	Update 6 files
- /_posts/2018-11-10-email-sender.md - /_posts/2021-03-02-workers.md - /_posts/2019-11-21-enc.md - /_posts/2019-06-22-counter.md - /_layouts/default.html - /feed.xslt.xml
This commit is contained in:
		| @@ -2,15 +2,15 @@ | ||||
| <html lang="{{ site.lang | default: "zh-CN" }}"> | ||||
|  | ||||
| <head> | ||||
|   <meta charset="UTF-8"> | ||||
|   <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||||
|   <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|   <meta charset="UTF-8" /> | ||||
|   <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||||
|   <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||||
|  | ||||
|   {% seo %} | ||||
|   {% feed_meta %} | ||||
|   <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/rss.xml" | absolute_url }}" /> | ||||
|   <link rel="alternate" type="application/json" title="{{ site.title }}" href="{{ "/feed.json" | absolute_url }}" /> | ||||
|   <link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}" /> | ||||
|   <link rel="alternate" type="application/rss+xml" title="{{ site.title }}(RSS)" href="{{ "/rss.xml" | absolute_url }}" /> | ||||
|   <link rel="alternate" type="application/json" title="{{ site.title }}(JSON Feed)" href="{{ "/feed.json" | absolute_url }}" /> | ||||
|   <link rel="stylesheet" href="/assets/css/style.css?v={{ site.time | date: "%s" }}" /> | ||||
|   <link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" /> | ||||
|   <link rel="blogroll" type="text/xml" href="/blogroll.opml" /> | ||||
|   <!--[if lt IE 9]> | ||||
| @@ -69,7 +69,7 @@ | ||||
|       <p>{{ site.description | default: site.github.project_tagline }}</p> | ||||
|  | ||||
|       <p> | ||||
|       <form action="/search.html"><input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.."> | ||||
|       <form action="/search.html"><input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." /> | ||||
|         <input type="submit" /> | ||||
|       </form> | ||||
|       </p> | ||||
| @@ -106,8 +106,8 @@ | ||||
|       <canvas id="live2d" width="500" height="560" class="live2d"></canvas> | ||||
|       <div class="live_talk_input_body"> | ||||
|         <div class="live_talk_input_name_body" {% unless page.layout == "post" %}style="display:none;"{% endunless %}> | ||||
|           <input type="checkbox" id="load_this"> | ||||
|           <input type="hidden" id="post_id" value="{{ page.url }}"> | ||||
|           <input type="checkbox" id="load_this" /> | ||||
|           <input type="hidden" id="post_id" value="{{ page.url }}" /> | ||||
|           <label for="load_this"> | ||||
|             <span style="font-size: 11px; color: #fff;"> 想问这篇文章</span> | ||||
|           </label> | ||||
| @@ -126,7 +126,7 @@ | ||||
|         <div class="live_ico_item type_quit" id="hideButton"></div> | ||||
|         <input name="live_statu_val" id="live_statu_val" value="0" type="hidden" /> | ||||
|         <audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio> | ||||
|         <input id="duType" value="douqilai" type="hidden"> | ||||
|         <input id="duType" value="douqilai" type="hidden" /> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div id="open_live2d">召唤伊斯特瓦尔</div> | ||||
|   | ||||
| @@ -13,7 +13,7 @@ tags: [免费, 邮件, 日报, 心得] | ||||
| 到我的邮箱了…… | ||||
|  | ||||
| # 代码 | ||||
| ``` PHP | ||||
| ```php | ||||
| <?php | ||||
| function curl_post_https($url,$data){ // 模拟提交数据函数 | ||||
|     $curl = curl_init(); // 启动一个CURL会话 | ||||
|   | ||||
| @@ -22,7 +22,7 @@ tags: [计数器] | ||||
| {% raw %} Hits: <span id="{{ page.url }}" class="visitors" >Loading...</span>{% endraw %}  | ||||
| ``` | ||||
|   JS代码:(需要Jquery) | ||||
| ```js | ||||
| ```javascript | ||||
| var auxiliaryHost = "你的域名"; | ||||
| function showHitS(hits){ | ||||
|     $.get(auxiliaryHost+"/counter.php?action=show&id="+hits.id,function(data){ | ||||
|   | ||||
| @@ -16,7 +16,7 @@ tags: [学习笔记, Web Crypto Api] | ||||
|   不过我还是发挥了作为辣鸡程序员的特长——Copy&Paste大法,最终可算是拼凑出了一个看起来勉强能用的代码…… | ||||
|  | ||||
| # 辣鸡代码 | ||||
| ```js | ||||
| ```javascript | ||||
| function getByteLen(val) { | ||||
|     var len = 0; | ||||
|     for (var i = 0; i < val.length; i++) { | ||||
|   | ||||
| @@ -13,7 +13,7 @@ tags: [CloudFlare, Workers] | ||||
| # 首先给自己搭个反代 | ||||
|   之前我用PHP给自己的博客搭了一个[简单的反代](/2021/01/06/proxy.html),不过我用的那个服务商不太行,速度有点慢,而且也不是所有的PHP空间都支持伪静态。那既然有CloudFlare Workers那我们就来试试用这个实现吧。    | ||||
|   代码如下: | ||||
| ```js | ||||
| ```javascript | ||||
| addEventListener("fetch", event => { | ||||
|   let url = new URL(event.request.url); | ||||
|   url.hostname = "mabbs.github.io"; | ||||
|   | ||||
| @@ -59,7 +59,7 @@ https://nicolas-hoizey.com/feeds/all.xml | ||||
|             </h1> | ||||
|             <h2><xsl:value-of select="atom:feed/atom:title"/><xsl:value-of select="/rss/channel/title"/></h2> | ||||
|             <p><xsl:value-of select="atom:feed/atom:subtitle"/><xsl:value-of select="/rss/channel/description"/></p> | ||||
|             <p>This preview only shows titles and summaries, but the actual feed(Atom) contains the full content.</p> | ||||
|             <p>This preview only shows titles and summaries<xsl:if test="atom:feed">, but the actual feed contains the full content</xsl:if>.</p> | ||||
|             <a href="/"> | ||||
|               Visit Website → | ||||
|             </a> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user