Using this method solves the problem, but it doesn't feel elegant enough
let response;
try {
if (isJSON) {
response = await res.json();
} else {
response = await res.text();
}
} catch (e) {
response = await res;
}
Using this method solves the problem, but it doesn't feel elegant enough
let response;
try {
if (isJSON) {
response = await res.json();
} else {
response = await res.text();
}
} catch (e) {
response = await res;
}
@baris I removed the www. I debugged many times and the fetch was 404. I don’t understand why this happened. I have switched back to the version of $.ajax
@baris Now it runs successfully. I don’t know why fetch can’t run. On my website
@baris It can be successful here. On my site, a breakpoint error is reported in fetch, which seems to be the reason for packaging.
I replaced fetch with $.ajax and restored
async function xhr(options, cb) {
// Allow options to be modified by plugins, etc.
({ options } = await fireHook('filter:api.options', { options }));
$.ajax(options)
.done((res) => {
cb(null, (
res &&
res.hasOwnProperty('status') &&
res.hasOwnProperty('response') ? res.response : (res || {})
));
})
.fail((ev) => {
let errMessage;
if (ev.responseJSON) {
errMessage = ev.responseJSON.status && ev.responseJSON.status.message ?
ev.responseJSON.status.message :
ev.responseJSON.error;
}
cb(new Error(errMessage || ev.statusText));
});
}
Sign up button doesn't work,Will not jump after registration v3.3.0
It can be combined with systemctl and tmux for script startup, it is very convenient tmux a can go back to the background to see real-time logs
Here's my server startup script for reference, tmux is too convenient for me!
#!/bin/zsh
# Define the function that sends the command
send_command() {
tmux send -t $1 $2 Enter
}
# Close and delete the tmux session named "db".
tmux kill-session -t "db"
# Create a tmux session named "db".
tmux new -t "db" -d
tmux rename-window -t "db:1" "mongod"
# n the "mongod" pane, execute the command
send_command "mongod" "cd /home/web/MongoDB/bin/ && ./mongod --config ./mongo.conf"
# Creating Horizontally Split Panes
tmux split-window -h -t "db:mongod" -d
tmux select-window -t "db:mongod"
tmux select-pane -t "2"
# Close and delete the tmux session named "nodebb".
tmux kill-session -t "nodebb"
# Create a tmux session called "nodebb".
tmux new -t "nodebb" -d
tmux rename-window -t "nodebb:1" "grunt"
# Execute the command in the "grunt" pane.
send_command "nodebb" "cd /home/web/NodeBB/ && ./nodebb slog"
# Creating Horizontally Split Panes
tmux split-window -h -t "nodebb:grunt" -d
tmux select-window -t "nodebb:grunt"
tmux select-pane -t "2"
exit 0
[Unit]
Description=Startup Script
After=network.target
[Service]
Type=forking
Environment=TERM=xterm-256color
ExecStartPre=/usr/bin/zsh -c 'source $HOME/.zshrc'
ExecStart=/root/auto_script/startup.sh
User=root
Group=root
[Install]
WantedBy=multi-user.target
This problem has been troubled for a long time, thank you very much to solve it!
@pitaj
img is width: 100% but it Included in the div. It is impossible to alone fill the screen. It is great if the picture can fill the screen
I remove the padding of class="container"
But this is not perfect, it stillhave extra space for sliding to the right on the phone
I want to remove the padding to make the <div> fill the screen
I tried to modify the CSS,i try
.container{
padding-left: 0px;
padding-right: 0px;
}
have many try but all is this.Extra space, when sliding.Only on mobile phones
This issue occurs when swiping to the right
original:
After modification:
Current theme [email protected]
I checked the subject of the .less file, but I haven't found a way yet
Because need to browse comics, the extra space will be very uncomfortable (OCD)