Coder Social home page Coder Social logo

click-to-copy-equations's Introduction

一键复制公式和github公式渲染

推荐环境:Chrome+Tampermonkey,不保证其他环境的兼容性。

一键复制公式

GreasyFork发布页

main.user.js 目前支持下列网站

网站 URL 附加说明
知乎 zhihu.com/question/*
zhuanlan.zhihu.com/p/*
wikipedia wikipedia.org/*
wikiwand wikiwand.com/*
CSDN blog.csdn.net/*/article/* *只支持markdown编写的
使用katex渲染的公式

*Mathjax渲染的公式自带查看LaTeX代码的功能

如果你有其他常用的网站欢迎反馈

github公式渲染(已过期)

github 已经支持 mathjax,这个脚本没用了

GreasyFork发布页

github.user.js 渲染github在线预览Markdown中的公式

例如下面这个公式,安装此插件后就能正确显示了,不过脚本还存在一些无法修复的小bug,渲染结果仅供参考

$$e(\vec x,\vec y)=\frac 1n\sum_{i=1}^{n}\exp\left[-\frac 34\frac{(x_i-y_i)^2}{\sigma_i^2}\right]$$

click-to-copy-equations's People

Contributors

flaribbit avatar ssparkluo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

click-to-copy-equations's Issues

大佬脚本还维护吗

维基百科的段落公式好像不管用,然后知乎现在好像更新了公式的渲染方式好像换成什么mathjax2,原来的脚本失效了?

Edge下知乎wikiwand无法使用

您好,感谢之前您的更新,但是似乎还是无法解决我的EDGE浏览器下对于zhihu和wikiwand的公式的点击复制,但是对于wikipedia可以正常使用。暂时还没有测试chrome下是否正常,大佬如果有空的话,也许可以测试一下EDGE下是否可用。

个人改动的脚本无法成功运行

各位好,这是我根据这一网站 https://www.lianxh.cn/news/16508d946978a.html 自己写的代码,但不清楚为什么无法成功,恳请各位帮忙排查

else if (host.search('lianxh.cn') >= 0) {
        const copyTex = function () {
            navigator.clipboard.writeText('$' + this.querySelector('annotation').textContent.trim() + '$');
            this.style.animation = 'aniclick .4s';
        }
        const eqs = document.querySelectorAll('.katex');
        for (let i = 0; i < eqs.length; i++) {
            eqs[i].onclick = copyTex;
            eqs[i].addEventListener('animationend', clearAnimation);
            eqs[i].title = '点击即可复制公式';
        }
    }

Chrome CSDN公式复制无法正常使用

感谢大佬用爱发电!
正如题目所述,CSDN的一键复制无法正常使用,鼠标移动至公式上仍旧会浮现“点击即可复制公式”但是点击后没有反应,也没有蓝框效果。在知乎和Wikipedia上仍旧可以正常使用。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.