nganlovemy / Block FaceBook

// ==UserScript==
// @name Block FaceBook
// @description Cai FB
// @version 1.6
// @author ThienMy
// @license MIT
// @include *
// @icon http://pics.smotri.com/cskins/blue/smiles/bt.gif
// @grant none
// ==/UserScript==



var host_name=window.location.host;
if((host_name==='www.facebook.com')||(host_name==='m.facebook.com')||(host_name==='mbasic.facebook.com')){
	var d = new Date(),
	 h = d.getHours(),
	 p=d.getMinutes(),
	 minutenow=60*h+p,
	 time_star=1200,
	 time_end=1380,
	 url='https://tdcntk.000webhostapp.com/hoc.html';
	 if(minutenow>=time_star&&minutenow<=time_end){
		 window.location.assign(url);
	 }
}