Skip to content

Instantly share code, notes, and snippets.

🐕
Hi! boy

Surmon surmon-china

🐕
Hi! boy
Block or report user

Report or block surmon-china

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View listen1_aha_playlist.md

本歌单由Listen1创建, 歌曲数:1,歌单数:1,点击查看更多

View gobang.canvas.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>五子棋 - canvas版</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
}
View vue-echarts.vue
<template>
<div class="vue-echarts"></div>
</template>
<script>
export default {
props: {
options: {
type: Object,
required: true
View scroll-to-anywhere.js
"use strict"
let BezierEasing = require("bezier-easing")
let _ = {
$(selector) {
return document.querySelector(selector)
},
on(element, events, handler) {
if (!(events instanceof Array)) {
View jquery:平滑滚动页面到某个锚点
$(document).ready(function() {
$("a.topLink").click(function() {
$("html, body").animate({
scrollTop: $($(this).attr("href")).offset().top + "px"
}, {
duration: 500,
easing: "swing"
});
return false;
});
@surmon-china
surmon-china / html-filters.js
Created Feb 27, 2017
html数据处理过滤器
View html-filters.js
/*
*
* HTML编译输出过滤器
*
* Description
*
*/
// url对象(a)
const urlParser = document.createElement('a')
@surmon-china
surmon-china / time-filters.js
Created Feb 27, 2017
时间处理过滤器
View time-filters.js
/*
*
* 时间格式化过滤器
*
* Description
*
*/
// 取剩余秒
const pluralize = (time, label) => {
@surmon-china
surmon-china / array_extends.js
Created Feb 27, 2017
js数组原型扩展方法
View array_extends.js
// Array方法扩展
// 获取元素下标
Array.prototype.indexOf = function(item) {
for (var i = 0; i < this.length; i++) {
if (this[i] == item) return i;
}
return -1;
};
@surmon-china
surmon-china / vue-meta.js
Created Feb 26, 2017
vue-meta的优化版
View vue-meta.js
/**
* vue-meta v0.5.3
* (c) 2016 Declan de Wet
* @license MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.VueMeta = factory());
}(this, (function () { 'use strict';
@surmon-china
surmon-china / duoshuo.embed.js
Last active Feb 25, 2017
vue-中使用多说,及多说HTTPS/SSL优化
View duoshuo.embed.js
function ua(e) {
var r = new Array;
var outputer = '';
if (r = e.match(/MSIE\s([^\s|;]+)/gi)) {
outputer = '<span class="ua_ie"><i class="iconfont icon-internet"></i>Internet Explorer' + '|' + r[0].replace('MSIE', '').split('.')[0]
} else if (r = e.match(/FireFox\/([^\s]+)/ig)) {
var r1 = r[0].split("/");
outputer = '<span class="ua_firefox"><i class="iconfont icon-internet"></i>Mozilla FireFox' + '|' + r1[1]
} else if (r = e.match(/Maxthon([\d]*)\/([^\s]+)/ig)) {
var r1 = r[0].split("/");
You can’t perform that action at this time.