menu LittleJake's Blog
color_lens
avatar
Jake Liu
Never Settle
creative commons by-nc-sa
hit
Category
keyboard_arrow_down

© 2024 LittleJake's Blog.

萌ICP备20223020号

京东一键晒图(转)


JD

I will optimize the code if I'm free.

Step

  1. Open Website:JD after-comment

  2. Login to jd

  3. Copy codes below to Development Console as previous post.

Unoptimized code

var time;  
function a() {  
    var close = document.getElementsByClassName('btn-9');  
    if (close.length > 0) {  
        close[0].click()  
        var imgs = document.getElementsByName('imgs1')[0];  
        if (imgs != null) {  
            imgs.value = "//img30.360buyimg.com/shaidan/jfs/t6565/276/1439852732/41507/d7dc6d5e/59522c69N31c33f50.jpg";  
            var submit = document.getElementsByClassName('btn-5 mr10 setcomment')[0];  
            submit.click();  
            time = setTimeout('a()', 5000)  
        }  
    } else {  
        clearTimeout(time);  
    }  
};  
a();

Buy me a beer
Jake Liu
Never Settle

Title: 京东一键晒图(转)

Author: Jake Liu

Origin:

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) For any re-post you must give appropriate credit.

文章遵循CC许可 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 转载请注明出处

Tag:none

评论区

Add a new comment.

Theme