Small bookmarks one click access to Taobao tmall matching packages and coupons wireless connection

» Toss and turn » Small bookmarks one click access to Taobao tmall matching packages and coupons wireless connection

code

 javascript: (function() { function qr(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r !=  null) return r[2]; return null; } var site = window.location.href.match(/^http(s)?:\/\/[^?]*/); var collocationId = qr("collocationId");// tc var sellerId = qr("sellerId"); var userId = qr("userId"); var activity_ id = qr("activity_ id");// yhq var seller_ id = qr("seller_ id");// yhq var id = qr("id"); if (collocationId !=  null ) { var pureUrl = ' http://h5.m.taobao.com/cm/collocation.html?id= ' + collocationId + '&userId=' + sellerId; } else if (id !=  null && userId !=  null) { var pureUrl = ' http://h5.m.taobao.com/cm/collocation.html?id= ' + id + '&userId=' + userId; }else if (id !=  null) { var pureUrl = site[0] + "? id=" + id; } else if (activity_ id !=  null && seller_ id !=  null) { var pureUrl = ' https://market.m.taobao.com/apps/aliyx/coupon/detail.html?activity_ id='+ activity_ id + '&seller_ id=' + seller_ id; } else { Alert ('This script is only applicable to Taobao details page / package page / coupon page '); } Var reload = prompt ("optimized link:" pureurl) "; if (reload !=  null) { window.location.href = pureUrl; } })();

Compressed version

 javascript:(function(){function a(a){a=new RegExp("(^|&)"+a+"=([^&]*)(&|$)","i"); a=window.location.search.substr(1).match(a); return null!= a?a[2]:null}var g=window.location.href.match(/^http(s)?:\/\/[^?]*/), d=a("collocationId"),h=a("sellerId"),e=a("userId"),f=a("activity_ id"),k=a("seller_ id"),c=a("id"); if(null!= d)var b=" http://h5.m.taobao.com/cm/collocation.html?id= "+d+"&userId="+h; else null!= c&&null!= e?b=" http://h5.m.taobao.com/cm/collocation.html?id= "+c+"&userId="+e:null!= c?b=g[0]+"? id="+c:null!= f?b=" https://market.m.taobao.com/apps/aliyx/coupon/detail.html?activity_ id="+f+"&seller_ id="+k:alert("\u672c\u811a\u672c\u4ec5\u9650\u4e8e\u6dd8\u5b9d\u8be6\u60c5\u9875/\u5957\u9910\u9875/\u4f18\u60e0\u5238\u9875\u9762\u4f7f\u7528"); null!= prompt("\u4f18\u5316\u7248\u94fe\u63a5\uff1a",b)&&(window.location.href=b)})();

How to use it

Collect any web page to the browser bookmark bar, and then change the URL to the above compressed version code. Click the button when you need to use it.

Use demo

小书签一键获取淘宝天猫搭配套餐和优惠券的无线连接-极客公园

--Over--

-- 完 --

Comment

Your email address will not be disclosed. Required item used * tagging

2 replies to "one click bookmark for wireless connection of Taobao tmall matching packages and coupons"