Skip to content

Instantly share code, notes, and snippets.

@LiuinStein
Created May 23, 2018 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LiuinStein/e7421583c89ceec529a63783ad4079d6 to your computer and use it in GitHub Desktop.
Save LiuinStein/e7421583c89ceec529a63783ad4079d6 to your computer and use it in GitHub Desktop.
A Tampermonkey JavaScript to alert you go to study after watching some websites more than a specific period.
// ==UserScript==
// @name Study now!
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Shaoqun Liu
// @match *://*.iqiyi.com/*
// @match *://*.youku.com/*
// @match *://*.le.com/*
// @match *://*.letv.com/*
// @match *://v.qq.com/*
// @match *://*.tudou.com/*
// @match *://*.mgtv.com/*
// @match *://film.sohu.com/*
// @match *://tv.sohu.com/*
// @match *://*.acfun.cn/v/*
// @match *://*.bilibili.com/*
// @match *://vip.1905.com/play/*
// @match *://*.pptv.com/*
// @match *://v.yinyuetai.com/video/*
// @match *://v.yinyuetai.com/playlist/*
// @match *://*.fun.tv/vplay/*
// @match *://*.wasu.cn/Play/show/*
// @match *://*.56.com/*
// @match *://*.youtube.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var minute = 15;
var count = 0;
setInterval(function(){
alert("你已经连续看了超过"+(++count)*15+"分钟了哦");
}, minute*60*1000);
// Your code here...
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment