差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

it:skills:tempermonky [2023-08-13 19:45] – 创建 goldentianyait:skills:tempermonky [2023-08-13 19:46] (当前版本) goldentianya
行 1: 行 1:
 ====== 油猴脚本 ====== ====== 油猴脚本 ======
  
-通过油猴脚本实现在Notion笔记中,显示易学卦。以下是最简易的一个脚本,在''<head>''当中插入script。+以下是最简易的一个脚本,在''<head>''当中插入script。
  
 <code | javascript> <code | javascript>
行 26: 行 26:
     document.head.appendChild(customScript);     document.head.appendChild(customScript);
 })(); })();
 +</code>
 +
 +===== 易学排盘 =====
 +通过油猴脚本实现在Notion笔记中,显示易学卦。
 +
 +<code>
 +// ==UserScript==
 +// @name         Notion Custom Script
 +// @namespace    none
 +// @version      0.1
 +// @description  Inject custom script into Notion pages
 +// @match        https://notion.so/*
 +// @match        https://www.notion.so/*
 +// @grant        none
 +// ==/UserScript==
 +
 +(function() {
 +    'use strict';
 +
 +    // Create a <script> element for KaTeX
 +    var katexScript = document.createElement('script');
 +    katexScript.type = 'text/javascript';
 +    katexScript.src = 'http://mysite.com/katex.min.js';
 +    katexScript.charset = 'utf-8';
 +    katexScript.defer = true;
 +
 +    // Append the <script> element to the <head>
 +    var head = document.getElementsByTagName('head')[0];
 +    head.appendChild(katexScript);
 +})();
 +
 </code> </code>
it/skills/tempermonky.1691955914.txt.gz · 最后更改: 2023-08-13 19:45 由 goldentianya
回到顶部
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0