Skip to content

Instantly share code, notes, and snippets.

View Kenshin's full-sized avatar
✍️
😀 💪 ☕

Kenshin Wang Kenshin

✍️
😀 💪 ☕
View GitHub Profile
@Kenshin
Kenshin / simpread_custom_Dakr&Peace.user.css
Last active February 26, 2024 15:33
简悦用户定制样式合辑 with Stylus
/* ==UserStyle==
@name simpread style: Dark & Peace
@namespace simpread.pro
@version 0.1.0
@description dark mode for eye protection
@author eterlen
==/UserStyle== */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;300;400;500&family=Noto+Sans&family=Noto+Sans+SC:wght@100;300;400;500&family=Noto+Sans+TC:wght@100;300;400;500&family=Noto+Serif&family=Noto+Serif+SC:wght@100;300;400;500&family=Noto+Serif+TC:wght@100;300;400;500&family=PT+Serif:wght@400;700&display=swap");
.simpread-theme-root {
@Kenshin
Kenshin / website_list.json
Last active April 7, 2024 18:48
SimpRead 第三方适配源,使用方法 👉 https://github.com/Kenshin/simpread/discussions/2287
{
"sites" : [{
"name" : "threadreaderapp.com",
"url" : "http*://threadreaderapp.com/thread/*.html",
"title" : "[[{(function(){return $($('.content-tweet')[0]).text().replace('\\n','')}())}]]",
"desc" : "",
"include" : "[[{(()=>{let html='';$('html').append(`<sr-thread-site></sr-thread-site>`);const $target=$('sr-thread-site'),len=$('.content-tweet.allow-preview').length;$('.content-tweet.allow-preview').map((idx,item)=>{const hr=idx<len-1?'<hr></hr>':'';$target.html(item.innerHTML);$target.find('img.b-loaded').map((idx,img)=>{$(img).parent().replaceWith($(img))});$target.find('.entity-url-preview').map((idx,item)=>{const $item=$(item),text=$item.find('.paragraph a:first strong').text(),href=$item.find('.pre-url').text(),$url=$($target.find('.entity-url')[idx]);if(text!=''&&href==$url.attr('href')){$url.text(text)}});$target.find('.entity-url-preview').remove();$target.find('.ribbon-content').remove();html+=`<sr-threadreader>${$target.html()+hr}</sr-thre
/**
* Bear Theme with Typora
*
* @version : 0.0.1
* @update : 2018/09/08
* @homepage: https://gist.github.com/Kenshin/e5adc79da3149315bdfd72a35b70d65e
* @license : MIT https://github.com/kenshin/mduikit/blob/master/LICENSE
* @author : Kenshin Wang <kenshin@ksria.com>
*
* @copyright 2018
const root = 'sr-plugin-search',
google = '<svg t="1531450684775" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1048" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14"><defs><style type="text/css"></style></defs><path d="M518.848 449.152l414.272 0q6.848 38.272 6.848 73.152 0 124-52 221.44t-148.288 152.288-220.864 54.848q-89.728 0-170.848-34.56t-140-93.44-93.44-140-34.56-170.848 34.56-170.848 93.44-140 140-93.44 170.848-34.56q171.424 0 294.272 114.848l-119.424 114.848q-70.272-68-174.848-68-73.728 0-136.288 37.152t-99.136 100.864-36.576 139.136 36.576 139.136 99.136 100.864 136.288 37.152q49.728 0 91.424-13.728t68.576-34.272 46.848-46.848 29.44-49.728 12.864-44.576l-249.152 0 0-150.848z" p-id="1049" fill="#ffffff"></path></svg>',
bing = '<svg t="1531450907872" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3129" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height=
@Kenshin
Kenshin / main.js
Last active September 3, 2018 07:26
Lightbox( 点击查看大图 ) - 简悦插件 → https://github.com/Kenshin/simpread/wiki/插件编写
$content.find("img").click( ( event ) => {
if ( $content.find( 'sr-plugin-lightbox-bg' ).length > 0 ) return;
const src = event.target.currentSrc,
width = event.target.naturalWidth,
height = event.target.naturalHeight;
$content.append( `<sr-plugin-lightbox-bg><sr-plugin-lightbox><img src="${src}"></img></sr-plugin-lightbox></sr-plugin-lightbox-bg>` )
const $target = $( 'sr-plugin-lightbox' ),
$img = $( 'sr-plugin-lightbox' ).find( 'img' ),
offset = 20,
maxWidth = $( 'sr-plugin-lightbox-bg' ).width(),
@Kenshin
Kenshin / Firebug
Created May 5, 2018 08:31
Firebug
This file has been truncated, but you can view the full file.
(function() {
/**************************************************************
*
* Firebug Lite 1.4.0
*
* Copyright (c) 2007, Parakey Inc.
* Released under BSD license.
* More information: http://getfirebug.com/firebuglite
*
**************************************************************/
@Kenshin
Kenshin / mduikit.light.js
Last active May 30, 2020 07:03
MDUIKit light
var mduikit = (function (exports) {
'use strict';
/**
* Button
*
* @param {string} href
* @param {string} text
* @param {string} disable
* @param {string} color
@Kenshin
Kenshin / simpread_user.css
Last active April 28, 2018 01:36
简悦的 UserScirpt 版本,只提供最基本的功能,完整版请看 https://github.com/Kenshin/simpread
sr-rd-crlbar.controlbar {
width: 100px;
height: 200px;
z-index: 2147483647;
}
sr-rd-crlbar fab {
position: fixed;
display: block;
@Kenshin
Kenshin / gulpfile.js
Created February 23, 2016 05:31
Gulpfile.js example
var gulp = require( 'gulp' ),
print = require( 'gulp-util' ),
notify = require( 'gulp-notify' ),
plumber= require( 'gulp-plumber'),
jshint = require( 'gulp-jshint' ),
stylish= require( 'jshint-stylish'),
stylus = require( 'gulp-stylus' ),
csslint= require( 'gulp-csslint'),
watch = require( 'gulp-watch' ),
server = require( 'browser-sync').create(),