JavaScript JS How code encrypts bound domain names

Source: Internet
Author: User
(function () {for (var c=location.host,a= "", b=0;b<c.length;b++) a+=c[b].charcodeat (0); 119119119461161011151164699111109 "!=a) throw new Urierror (" \u968f\u4fbf\u5199\u70b9\u5565\u54c7\u3002\u3002 ");}) ();

Add this piece of code to the top of the JS file that does not allow other domain names to load, the encryption is actually used with a JS compression tool can be. The top code I'm using is Google's Closure Compiler. JS file to add the above code, only allow www.test.com domain name loading.

The source files are as follows:

(function () {        var chars = ' 119119119461161011151164699111109 ';        var hosts = Location.host;        var s = ';        for (Var i=0;i

JavaScript JS How code encrypts bound domain names

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.