This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: ["v*"] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
email = john.smith@gmail.com | |
name = John Smith | |
[push] | |
default = simple | |
[alias] | |
co = checkout | |
ci = commit | |
czp = cz && git pu | |
st = status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
async function fetchAndApply(request) { | |
if(request.url === 'https://api.tloxygen.com/ip' || request.url === 'http://api.tloxygen.com/ip') { | |
const ip = request.headers.get('cf-connecting-ip') | |
return new Response(ip) | |
} else if (request.url === 'https://api.tloxygen.com/country' || request.url === 'http://api.tloxygen.com/country') { | |
const ip = request.headers.get('cf-ipcountry') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.markdown-here-wrapper { | |
font-size: 16px; | |
line-height: 1.8em; | |
letter-spacing: 0.1em; | |
} | |
pre, code { | |
font-size: 14px; | |
font-family: Roboto, 'Courier New', Consolas, Inconsolata, Courier, monospace; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<title>Auto play html audio in iOS WeChat InAppBrowser the right way</title> | |
</head> | |
<body> | |
<h1>在 iOS 微信浏览器中自动播放 HTML5 audio(音乐) 的正确方式</h1> | |
<p>核心原理: 在微信的JS-API 中 play 一下 audio 即可达到自动播放的目的(应该是微信自己做了处理)</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//试试用手机访问,可以看出结果哦 | |
var ua = navigator.userAgent; | |
isAndroid = /Android/i.test(ua); | |
isBlackBerry = /BlackBerry/i.test(ua); | |
isWindowPhone = /IEMobile/i.test(ua); | |
isIOS = /iPhone|iPad|iPod/i.test(ua); | |
isMobile = isAndroid || isBlackBerry || isWindowPhone || isIOS; | |
if(isAndroid) isMobile = 'android'; | |
if(isBlackBerry) isMobile = 'BlackBerry'; |