Command Palette

Search for a command to run...

WordPress文章中自动转义"&"成"&038;"

今天发现在文章内用自定义html写js时,&号会被自动转义成 &038; 。 html元素转义不要紧,但是js转义就直接报错了。 网上说在 function 里加各种代码都不行。 分享一个官方的解决方法: <https://codex.wordpress.org/Using_Javascript> 在自定义html内写入: <script type="text/javascript"> <!-- ...

Code-Server 提示 This is likely because the editor is not running in a secure context

今天在code-server遇到一个错误提示 如下: crypto.subtle' is not available so webviews will not work. This is likely because the editor is not running in a secure context (https://developer.mozilla.org/en-US/docs/Web...

Html5 鱼儿游动态背景特效

示例: var ifr = document.getElementById('id1298'); ifr.onload = function() { var oHeight = Math.max(ifr.contentWindow.document.documentElement.offsetHeight, ifr.contentWindow.document.body.offsetHeight)...

冷门的css属性:initial

分享一个比较强硬的属性, 可以把几乎所有css属性进行重置。前端在 ctrl + c 时就不用这么痛苦检查样式了,虽然没办法像 <iframe src="..."></iframe> 那样彻底隔离 css 和 js 。 一键隔离所有父级css属性: all: initial; 还可以单独还原css属性默认值: color: initial; background-color: initial; b...

2024纯代码美化WordPress登录页

内容来自:<https://www.iowen.cn/chundaimameihuawordpressmorendengluye/> PHP源代码: / 美化Wordpress登录页 By 一为 原文地址:https://www.iowen.cn/chundaimameihuawordpressmorendengluye/ / function io_login_header(){ echo '<...

HTML

Chrome Edge 浏览器控制台不允许粘贴

会弹出警告: Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yourself. This could allow attackers to steal your identity or take control of your computer. P...

极简版自建一言语句php

查看效果:<https://www.krjojo.com/resources/sentences/> 这是hitokoto原版效果:<https://v1.hitokoto.cn/> 简直就是一模一样。 优点: 文件都在本地服务器 不依赖别人网站,高稳定性 不依赖数据库 可以自己修改语句包 缺点: 性能有那么一丢丢下降 一言数据来自:<https://github.com/hitokoto-osc...

有意思的鼠标特效

富强民主文明 <script type="text/javascript"> //定义获取词语下标 var a_idx = 0; jQuery(document).ready(function($) { //点击body时触发事件 $("body").click(function(e) { //需要显示的词语 var a = new Array("富强","民主", "文明", "和谐","自由"...

解决动态ajax/pjax加载mathjax不生效问题

在每次跳转的脚本后面添加执行脚本 如 window.pjaxLoaded = function(){ //页面每次跳转都会执行这里的代码 //do something... } 里面添加 $.getScript("//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML", function(...

WordPress页脚显示页面加载时间的方法

将下面的代码添加到当前主题的 函数模板(functions.php) 文件: //显示页面查询次数、加载时间和内存占用 From WNAG.COM.CN function performance( $visible = false ) { $stat = sprintf( '本次加载耗时:%.3fs', timer_stop( 0, 3 ) ); echo $visible ? $stat : "...