Batch Register Steam Keys

Allows you to redeem your Steam product keys with just one click

< Batch Register Steam Keys 피드백으로 돌아가기

리뷰: 좋음 - 스크립트가 잘 작동함

§
게시: 2017-09-20

Support multiline

I suggest to change input element to textarea element. And add newline seperator to split function.

Split:

keys = input.trim().split(/[\s,]+/);

Change element type:

function changeElementType(element, newtype) {
    var newelement = document.createElement(newtype);

    while(element.firstChild) newelement.appendChild(element.firstChild);

    for( var i=0, a=element.attributes, l=a.length; i<l; i++) {
        newelement.setAttribute(a[i].name, a[i].value);
    }

    element.parentNode.replaceChild(newelement, element);
    return newelement;
}
var eleInput = document.getElementById('product_key');
eleInput = changeElementType(eleInput, "textarea");

I test this work by modifying your script.

답글 게시

답글을 게시하려면 로그인하세요.