Improve Logsoku for Smartphone

replace visible link with image

目前為 2014-07-22 提交的版本,檢視 最新版本

// ==UserScript==
// @name           Improve Logsoku for Smartphone 
// @description    replace visible link with image
// @include        http://sp.logsoku.com/*
// @author         yechenyin
// @version        0.140
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @namespace https://gf.qytechs.cn/users/3586
// ==/UserScript==


var links = document.getElementsByTagName("a");
for (j=0; j<links.length; j++) {
    if (links[j].href.indexOf("http://l.moapi.net/") === 0) {
	links[j].href = links[j].href.replace("http://l.moapi.net/", "");
	
	if (links[j].href.match(/.\.(jpg|jepg|gif|png)$/)) {
	    var img = document.createElement("img");
	    img.src = links[j].href;
	    links[j].parentNode.replaceChild(img, links[j]);
	    j--;
	} 
    }
}

$(".nem, .em").each( function() {
    this.parentNode.removeChild(this.previousSibling);
    this.parentNode.removeChild(this);
})

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址