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
// 使用 userAgent 判断是否微信内置浏览器 | |
if( navigator.userAgent.toLowerCase().indexOf('micromessenger') > -1 || typeof navgator.wxuserAgent !== "undefined" ) { | |
return true; | |
} |
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
function postForm(path, params = {}) { | |
const form = document.createElement('form'); | |
form.setAttribute('method', 'post'); | |
form.setAttribute('action', path); | |
Object.keys(params).forEach((key) => { | |
if (params.hasOwnProperty(key)) { | |
const hiddenField = document.createElement('input'); | |
hiddenField.setAttribute('type', 'hidden'); | |
hiddenField.setAttribute('name', key); | |
hiddenField.setAttribute('value', params[key]); |
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
(function() { | |
// Adding upload button to Trix toolbar on initialization | |
document.addEventListener('trix-initialize', function(e){ | |
trix = e.target; | |
toolBar = trix.toolbarElement; | |
// Creation of the button | |
button = document.createElement("button"); | |
button.setAttribute("type", "button"); | |
button.setAttribute("class", "attach"); |
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
[unix_http_server] | |
file=/tmp/supervisor.sock | |
;username = dongwm | |
;password = 123 | |
[inet_http_server] | |
port = 0.0.0.0:5000 | |
username = dongwm | |
password = 123 |
OlderNewer