Greasy Fork is available in English.
try to take over the world!
当前为
// ==UserScript==
// @name 腾讯微云-笔记字数统计脚本
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include *://*.www.weiyun.com/disk/note/*
// @require http://cdn.bootcss.com/jquery/1.12.4/jquery.min.js
// @match https://www.weiyun.com/disk/note
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
window.onload = function(){
document.querySelector('.layout-body-inner').style.paddingLeft = 0;
document.querySelector('.layout-aside').style.display = 'none';
var editor = document.querySelector('#editor');
document.querySelector('.mod-action-wrap-menu').innerHTML += '<div class="action-item" id="chensuiyi-text-total"><div class="action-item-con">总字数:<span class="act-txt"></span></div></div>';
var total = document.querySelector('#chensuiyi-text-total .act-txt')
total.innerText = editor.textContent.length;//__quill.getText().length
editor.__quill.on('text-change', function(delta, oldDelta, source) {
total.innerText = editor.textContent.length;
});
}
})();