Greasemonkey:从JavaScript中提取3个参数并构建URL

时间:2016-10-06 18:41:41

标签: javascript greasemonkey

我需要从JavaScript中提取变量'id','Name','ds'的参数(在本例中为“aaa”,“bbb”,“ccc”):

bool IsRepeating( const std::string& in ) {
    if (in.length() < 1) return false;
    return (in + in).substr(1, 2 * in.length() - 2).find(in) != std::string::npos;
}

然后我想用提取的参数构建URL并在新标签中打开它:“www.mysite.com/script.php?id=aaa&name=bbb&ds=ccc”

谢谢你的帮助!

0 个答案:

没有答案