Skip to content

Instantly share code, notes, and snippets.

View littlee's full-sized avatar
🐽
sniffing

Littlee littlee

🐽
sniffing
  • Guangdong Guangzhou
View GitHub Profile
@littlee
littlee / toUnicode.js
Last active May 9, 2024 05:11
JavaScript convert string to unicode format
function toUnicode(str) {
return str.split('').map(function (value, index, array) {
var temp = value.charCodeAt(0).toString(16).toUpperCase();
if (temp.length > 2) {
return '\\u' + temp;
}
return value;
}).join('');
}
var data = [
{
id: 2,
name: 'c',
parent: 0
},
{
id: 3,
name: 'd',
parent: 1
@littlee
littlee / kuai_kua_wo.js
Last active July 26, 2021 01:15
Lanhu TW
// ==UserScript==
// @name Lanhu TW
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://lanhuapp.com/web/
// @icon https://lhcdn.lanhuapp.com/web/static/favicon.ico?v=2
// @grant none
// ==/UserScript==