Skip to content

Instantly share code, notes, and snippets.

View stevenwangking's full-sized avatar

Steven stevenwangking

View GitHub Profile
@stevenwangking
stevenwangking / gist:aa03eaa2536018e64d72dd480950085a
Last active October 11, 2023 10:05
Jenkins Build History 加强
// ==UserScript==
// @name Jenkins Build History 加强
// @namespace https://github.com/gaoshang212/jenkins-buildHistory-Ext
// @version 0.1.1
// @description a Jenkins shortcut tools to build history
// @author gaoshang212
// @icon http://jenkins.17haoyun.cn/static/d33a9f69/images/headshot.png
// @grant none
// @include http://jenkins.17haoyun.cn/*
// @exclude http://yd.koolearn-inc.com/app/*

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@stevenwangking
stevenwangking / css.css
Last active August 29, 2015 14:18 — forked from timrwood/css.css
* { outline: 1px solid red; }
*:before { outline: 1px dotted #800000; }
*:after { outline: 1px dashed #ff8080; }
* * { outline: 1px solid #ff4d00; }
* *:before { outline: 1px dotted #802600; }
* *:after { outline: 1px dashed #ffa680; }
* * * { outline: 1px solid #ff9900; }
* * *:before { outline: 1px dotted #804d00; }
* * *:after { outline: 1px dashed #ffcc80; }
* * * * { outline: 1px solid #ffe500; }
@stevenwangking
stevenwangking / Velocity.js---Feature:-Transforms.markdown
Created January 14, 2015 14:40
Velocity.js - Feature: Transforms
@stevenwangking
stevenwangking / js-scroll-bottom.js
Created August 28, 2014 08:45
js:判断滚动条已经滚动到底部
// 判断滚动条已经滚动到底部
if (Math.abs(document.body.clientHeight - document.documentElement.clientHeight) <= (document.documentElement.scrollTop || document.body.scrollTop)) {
alert("滚到底部");
}
// js 下载文件
function downloadFile(url) {
if (typeof(downloadFile.iframe) == 'undefined') {
downloadFile.iframe = document.createElement('iframe');
document.body.appendChild(downloadFile.iframe);
}
downloadFile.iframe.src = url;
downloadFile.iframe.style.display = 'none';
}
@stevenwangking
stevenwangking / jq-goto-hash.js
Created June 13, 2014 05:14
jQuery 锚点跳转滑动效果
////////////////////////////////////////////////////////////////////////////////
// 名称: 可穿戴设备网主程序
// 作者: Steven
// 链接: http://wangwen1220.github.io/
// 说明: Require jQuery
// 更新: 2014-6-10
////////////////////////////////////////////////////////////////////////////////
// Main
(function($) {
//'use strict';
var btn = document.getElementById("copy-button");
btn.addEventListener("click", clickHandler, false);
function clickHandler(e) {
e.target.dispatchEvent(new ClipboardEvent("copy", {dataType:'text/plain', data:'Simulated copy. Yay!'}));
}

ZeroClipboard v2.0.0 API Draft

Working draft of the new API for ZeroClipboard v2.0.0.

NOTE: A checked checkbox means that line item has already been implemented in the latest ZeroClipboard master branch.

API

@stevenwangking
stevenwangking / jq-gotop.js
Created March 6, 2014 01:33
jq:超简洁代码 jQuery goTop(返回顶部) | jq gotop
// 超简洁代码 jQuery goTop(返回顶部)
$(function() {
var $goTop = $('<div id="goTop" style="border:1px solid #444;background:#333;color:#fff;text-align:center;padding:10px 13px 7px 13px;position:fixed;bottom:10px;right:10px;cursor:pointer;display:none;font-family:verdana;font-size:22px;">^</div>').appendTo('body');
$(window).scroll(function() {
if ($(this).scrollTop() != 0) {
$goTop.fadeIn();
} else {
$goTop.fadeOut();
}