Hi-history

获取网站浏览历史

As of 2020-10-07 04:46:44 UTC. See the latest version.

// ==UserScript==
// @name         Hi-history
// @namespace    http://tampermonkey.net/
// @version      1.11
// @description  获取网站浏览历史
// @author       chillybird
// @match        http://*/*
// @match        https://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    if (self.frameElement && self.frameElement.tagName == "IFRAME") { 
        return;
	} 
	if (window.frames.length != parent.frames.length) { 
		return;
	} 
    //if (self != top){
     //   return;
    //}
    document.body.addEventListener('mousedown',function(e){
		var name=location.hostname.split('.')[1];
		var c_name=location.hostname.split('.')[0];
		if((String(e.target).search(name)<0||String(e.target).search(c_name)<0)&&String(e.target).search("http")>=0){//alert(e.target);
			if(String(e.target)=="https://www.baidu.com/"){e.target.target='_self';}else{e.target.target = '_blank';}}else if((String(e.target.parentNode).search(name)<0||String(e.target.parentNode).search(c_name)<0)&&String(e.target.parentNode).search("http")>=0){
				e.target.parentNode.target='_blank';}else if((String(e.target.parentNode.parentNode).search(name)<0||String(e.target.parentNode.parentNode).search(c_name)<0)&&String(e.target.parentNode.parentNode).search("http")>=0){
					e.target.parentNode.parentNode.target='_blank';}else if((String(e.target.parentNode.parentNode.parentNode).search(name)<0||String(e.target.parentNode.parentNode.parentNode).search(c_name)<0)&&String(e.target.parentNode.parentNode.parentNode).search("http")>=0){
						e.target.parentNode.parentNode.parentNode.target='_blank';}else if((String(e.target.parentNode.parentNode.parentNode.parentNode).search(name)<0||String(e.target.parentNode.parentNode.parentNode.parentNode).search(c_name)<0)&&String(e.target.parentNode.parentNode.parentNode.parentNode).search("http")>=0){
							e.target.parentNode.parentNode.parentNode.parentNode.target='_blank';}else{
                                if(String(e.target).search(name)>=0){
                                    e.target.target = '_self';}else if(String(e.target.parentNode).search(name)>=0){
                                        e.target.parentNode.target='_self';}else if(String(e.target.parentNode.parentNode).search(name)>=0){
                                            e.target.parentNode.parentNode.target='_self';}else if(String(e.target.parentNode.parentNode.parentNode).search(name)>=0){
                                                e.target.parentNode.parentNode.parentNode.target='_self';}else if(String(e.target.parentNode.parentNode.parentNode.parentNode).search(name)>=0){
                                                    e.target.parentNode.parentNode.parentNode.parentNode.target='_self';}else{}
                            }
		
	});
	//创建样式 
	var dom=document.createElement('style'),
	dom_body=document.getElementsByTagName('body')[0];
	dom.innerHTML='#markBook a:link{color: #0366d6;}#markBook{position: fixed;left: -220px;top: 0px;z-index: 9999999999;border-radius:5px;background-color: cornsilk;box-sizing: border-box;width: 220px;transition:all 400ms;}.bookNav{ overflow: hidden;/*border-radius: 5px;*/}.del_mark{position: absolute;bottom: 0px;left:0px;}.bookNav,.del_mark{width: 100%;height: 28px;line-height: 28px;/*position: absolute;bottom: 0px;*/background-color: lightgray;font-size: 16px;color: #A9A9A9;/*border: 1px solid #000000;*/}.hismark_history{float: left;width: 70px;line-height: 28px;box-sizing: border-box;display: inline;height: 28px;text-align: center;font-size: 14px;color: #000;cursor: pointer;}.exit{float:left;width: 150px;height: 28px;line-height: 28px;text-align:center;box-sizing: border-box;border-left: 2px solid #777777;cursor: pointer;}.exit:hover{color: rgb(250, 128, 114);}.history_notice{height: 280px;width: 190px;line-height: 40px;}.history_tab{padding: 10px 0px 0px 10px;display: block;box-sizing: border-box;padding-bottom: 5px;width: 250px;}.hismark_del{float: right;width: 80px;height: 28px;line-height: 28px;font-size: 12px;text-align: center;color: #000;cursor:pointer}.hismark_del:hover{color: red;}.s_item{width:190px;height: 40px;position: relative;text-align: left;border-bottom: 2px dashed #BEBEBE;padding-left: 5px;line-height: 40px;}.s_item a{text-decoration: none;font-size: 14px;width: 185px;display: inline-block;float: left;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;}.record_pull{position: absolute;top: 5px;left: 190px;width: 40px;height: 40px;background-color: transparent;opacity: 1;border-radius: 5px;line-height: 40px;font-size: 30px;color: #FFFFFF;text-align: center;cursor: pointer;transition:all 400ms}.m_hismark{overflow: hidden;width: 220px;}.s_item_bnt{position: absolute;top:10px; right: 0px;font-size: 14px;float: right;width:45px;height: 20px;cursor: pointer;display: none;color:rgb(250, 128, 114);text-align: center;box-sizing: border-box;}.i_item_bnt{width: 100%;height: 20px;line-height: 20px;box-sizing: border-box;float:left;}.i_item_bnt:last-child{border-left:2px solid rgb(250, 128, 114);}';
	dom_body.appendChild(dom);
	//创建标签
	dom=document.createElement('div');
	dom.id="markBook";
	var str="<div class='bookNav'><div class='hismark_history'><a href='https://www.baidu.com/'>Baidu</a></div><div class='exit'>Exit</div></div><div class='m_hismark'>";
	hismark_init();
	//创建按钮
	str+="</div><a  style='width: 220px;height: 40px;line-height: 40px;display: block;color: #8e959a;font-size: 14px;text-align: center;overflow: hidden;border-bottom:none;white-space: pre-wrap; text-overflow: ellipsis;' href="+location.href.slice(0,location.href.indexOf(location.host))+location.host+">"+location.href.slice(0,location.href.indexOf(location.host))+location.host+"</a><div class='record_pull'><img style='box-shadow: 0px 0px 20px #c7c7c7;border-radius: 50%;width: 100%; height: 100%' src='data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAEAAAAAAAD//gA8Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gOTAKAP/bAEMAAgEBAgEBAgICAgICAgIDBQMDAwMDBgQEAwUHBgcHBwYHBwgJCwkICAoIBwcKDQoKCwwMDAwHCQ4PDQwOCwwMDP/bAEMBAgICAwMDBgMDBgwIBwgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDP/AABEIAEQARAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzd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+zz4R0Cc39vpMKm4yXgJ/denAHI6noaKK+u4axVelXcac3FO+ibR+bcRUoKlCokub3Ve2ttepDptppOpXc+pXmg6TeX0zGSSacSu0rnks2X+Yk9SeTXufwyuFGgILe3tbGEAN5NrCsUfOc8Ae3Xr70UVnnlapNcspNpbJvY7co0rqS3sbNzp8d/coX3cuCwDcP9c9fr1rV37Y9o4UcYFFFfIYiT5Uj9OyuTcde5XkchqKKK4z3D//2Q=='></div></div>";
	dom.innerHTML=str;
	dom_body.appendChild(dom);
	var hist=document.getElementsByClassName('hismark_history')[0];
	var history_tab=document.getElementsByClassName('history_tab')[0];
	hist.addEventListener("mouseover",function(){
		hist.className="hismark_history hismark_active";history_tab.style.display='block';});
		
	//按钮事件
	var record_pull=document.getElementsByClassName("record_pull")[0];
	var markBook=document.getElementById('markBook');
	var exit_bnt=document.getElementsByClassName('exit')[0];
	record_pull.onclick=function(){
		markBook.style.left=0+"px";record_pull.style.top=0+"px";record_pull.style.right=0+"px";record_pull.style.display="none";
		//超出网页可视高度时固定高度,tab部分超出滚动,待改进
		var W_height=document.documentElement.clientHeight;
		var scroll_height=document.documentElement.clientHeight-73;
		var object_height=markBook.clientHeight;
		var scroll_tab=document.getElementsByClassName("history_tab");
		var m_hismark=document.getElementsByClassName("m_hismark")[0];
		if((object_height+40)>W_height){
			scroll_tab[0].style.height=scroll_height+"px";
			scroll_tab[0].style.overflow="scroll";
            scroll_tab[0].style.overflowX="hidden";
			m_hismark.style.height=scroll_height+"px";
		}
	};
	//打开关闭面板按钮
    record_pull.onmouseover=function(){
		record_pull.style.left=220+"px";
	};
	record_pull.onmouseout=function(){
		record_pull.style.left=190+"px";
	};
	exit_bnt.onclick=function(){markBook.style.left=-220+"px";record_pull.style.top=5+"px";record_pull.style.right=-40+"px";record_pull.style.display="block";};
	
    add_item_bnt();
    
    
	function hismark_init(){
        if (top != window) {
	        console.log("Not a top window!");
	        return;
	    }
		//获取浏览记录
		if(!sessionStorage)
		{
			str+="<div class='history_notice'>浏览器不支持sessionStorage!</div>";
		}else{
            console.log('first record!');
			if(his_item_length()<1){
				//建立第一条记录
				sessionStorage.setItem('url_1',location.href);
				sessionStorage.setItem('url_1_name',(document.getElementsByTagName('title')[0]).innerHTML);
				str+="<div class='history_tab'><div class='s_item'><a href="+sessionStorage.getItem('url_1')+">1:"+sessionStorage.getItem('url_1_name')+"</a><div class='s_item_bnt'><div class='i_item_bnt'rgb(250, 128, 114)>复制</div></div><textarea class='s_copy' style='height: 0px;width: 0px;opacity: 0;margin: 0px;padding: 0px;'>content</textarea></div></div>";
			}else{
				console.log('continue!');
				history_tab();
			}
		}
	}
    function history_tab(){
		str+="<div class='history_tab'>";
		var url_name='url_'+(his_item_length()+1);
		if(find_history(window.location.href)){
			sessionStorage.setItem(url_name,window.location.href);
			sessionStorage.setItem(url_name+'_name',(document.getElementsByTagName('title')[0]).innerHTML);
		}
		for(var i=1;i<=his_item_length();i++){
			if(sessionStorage.getItem('url_'+i)!==null)
			{
                if(sessionStorage.getItem('url_'+i+'_name')===null)
                    sessionStorage.setItem('url_'+i+'_name','note'+i);
				str+="<div class='s_item'><a href="+sessionStorage.getItem('url_'+i)+">"+i+":"+sessionStorage.getItem('url_'+i+'_name')+"</a><div class='s_item_bnt'><div class='i_item_bnt'rgb(250, 128, 114)>复制</div></div><textarea class='s_copy' style='height: 0px;width: 0px;opacity: 0;margin: 0px;padding: 0px;'>content</textarea></div>";
			}
		}
       str+="</div>";
	}
    function find_history(his_url){
    	var i=1;
    	var count=0;
    	while(sessionStorage.getItem('url_'+i)!==null){
    		if(sessionStorage.getItem('url_'+i)==his_url)
    			count=count+1;
    		if(count>0)
    			return false;
    		i=i+1;
    	}
    	return true;
    }
    
	function his_item_length(){
		var len=0;
		for(var i=1;i<=sessionStorage.length;i++)
		{
			if(sessionStorage.getItem('url_'+i)!==null)
				len=len+1;
		}
		return len;
	}
    var last_mark=0;
    function his_mark(his_url){
		var his_index;
		var i=1;
		while(sessionStorage.getItem('url_'+i)!==null){
    		if(sessionStorage.getItem('url_'+i)==his_url){
    			his_index=i;
    			break;
    		}
    		i=i+1;
    	}
		if(last_mark!==0&&last_mark!==his_index)
			document.getElementsByClassName("history_tab")[0].children[last_mark-1].style.borderBottom="2px dashed #BEBEBE";
		last_mark=his_index;
		document.getElementsByClassName("history_tab")[0].children[his_index-1].style.borderBottom="2px solid #FA8072";
	}
	var win_url=location.href;
	setInterval(function(){
		if(win_url!==location.href){
			var url_name='url_'+(his_item_length()+1);
			if(find_history(location.href)){
				sessionStorage.setItem(url_name,window.location.href);
			 	sessionStorage.setItem(url_name+'_name',(document.getElementsByTagName('title')[0]).innerHTML);
	            var ele=document.createElement('div');
				ele.className="s_item";
				ele.innerHTML="<a href="+sessionStorage.getItem(url_name)+">"+(his_item_length())+":"+sessionStorage.getItem(url_name+'_name')+"</a><div class='s_item_bnt'><div class='i_item_bnt'rgb(250, 128, 114)>复制</div></div><textarea class='s_copy' style='height: 0px;width: 0px;opacity: 0;margin: 0px;padding: 0px;'>content</textarea>";
	            document.getElementsByClassName("history_tab")[0].appendChild(ele);
                add_item_bnt();
			}
			win_url=location.href;
        }
        his_mark(location.href);
	},3000);
    function add_item_bnt(){
        //删除与复制按钮
        var s_item=document.getElementsByClassName('s_item');
        var s_item_bnt=document.getElementsByClassName('s_item_bnt');
        var s_copy=document.getElementsByClassName('s_copy');
        for(var i=0;i<s_item.length;i++){
            (function(i){
                s_item[i].onmouseover=function(){
                    s_item_bnt[i].style.display="block";
                    s_item[i].children[0].style.width=140+'px';
                };
                s_item[i].onmouseout=function(){
                    s_item_bnt[i].style.display="none";
                    s_item[i].children[0].style.width=185+'px';
                };
                //移除储存相应变量
                s_item_bnt[i].children[0].onclick=function(){
                	s_copy[i].innerHTML="【"+sessionStorage.getItem('url_'+(i+1)+'_name')+"】 "+sessionStorage.getItem('url_'+(i+1));
                	s_copy[i].select(); // 选择对象
					document.execCommand("Copy"); // 执行浏览器复制命令
                    alert("复制成功");
                };
            })(i);
        }
    }

    // Your code here...
})();