Question

I have one URL shortener website with Anti Virus Scanner (i.e) http://www.urlsaf.com in my website have one big feature that is paste URL to URL shortening service. However my website works fine in firefox because paste URL to URL shortening service is XMLhttprequest based so Google Chrome and other main browsers are blocked this request due to some security issues. My question is very simple:

how to disable paste URL to URL shortening service from my website?

I am such familiar in chrome's developer tool. So that I noticed two js file from my website and below I will give that codes to your reference. I hope it will more helps to you. Thanks In Advance. :-)

1.script.min.js

   eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2H(1d).2F(7(){g(2E($("#o")[0])!="2o")$("#o")[0].2k();I c={N:{1y:\'27 a 26 q!\',1m:\'23 22 21 1x!\'},o:$(8).19(\'#o\'),1A:7(a){$.20(8.N,a);I b=8.o.6(\'#q\'),w=8.o.6(\'#18\'),s=8.o.6(\'#12\').6(\'.11\');$(b).M().u(\'1U\',7(){1S(7(){g(c.10.Z()){w.C()}},1O)});$(b).u(\'C\',7(){g(b.Y(\'D\')){g(s.O(\':1t\')){s.Q(X)}$(b).u(\'1N\',7(){b.B(\'D\')});c.S(8)}});$(8.o.6(\'#18\')).u(\'C\',7(e){e.1f();c.K(\'\');g(b.Y(\'D\')){g(s.O(\':1t\')){s.Q(X)}};g(c.10.Z()){$(w).A(\'1i\',V);c.1k.Z()}})},10:7(){I a=$.1M(c.o.6(\'#q\').r()),13=a.1K(/^((1p|1q):\\/\\/)?([^\\/?#]+)(?:[\\/?#]|$)/i),U=13&&13[3];g(U!=1d.U){g(/^((1q?|1J):\\/\\/)(((([a-z]|\\d|-|\\.|y|~|[\\n-\\l\\h-\\m\\j-\\k])|(%[\\E-f]{2})|[!\\$&\'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[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q(2a);16}b.R(\'\').1b()},1k:7(){I b=c.o,1B=b.A(\'1D\'),v=b.6(\'#q\'),T=b.6(\'#t\').6(\'#G\'),1u=b.6(\'#t\').6(\'#15\'),1r=b.6(\'#t\').6(\'#14\'),1v=b.6(\'#t\').6(\'#P\'),1o=b.6(\'#t\').6(\'1L\').6(\'#1l\'),w=b.6(\'#18\'),s=b.19(\'#12\').6(\'.11\'),W,F;$.1P({1Q:\'1R\',q:1B,J:{q:v.r(),G:T.r(),15:1u.r(),14:1r.r(),P:1v.r(),1T:1o.O(\':x\'),1V:\'1W\'},1X:\'1Y\',1Z:7(){w.B(\'1e\').H(\'1s\')},1n:7(a){w.B(\'1s\').H(\'1e\');$(w).A(\'1i\',17);g(a.1n===V){g(a.J.24==\'G-1x\'){F=c.N.1m;T.M()}1a{$(v).r(a.J.q).H(\'D\');c.S(v);W=\'1p://1z.28.29.1C/1z?2b=2c&2d=2e&2f=\'+a.J.q+\'&2g=L|0\';s.2h(\'2i\',\'q(\'+W+\')\').Q(X).2j().u(\'C\',7(){1d.1g.2l=a.J.q+\'.2m?2n\'});F=\'\'}$(T).r(\'\')}1a{F=a.1w.2p}c.K(F)},1w:7(a){2q(\'2r 2s 2t... 2u\');2v.1g.2w()}})}};c.1A();$(\'#t\').1b();$(\'#2x\').u(\'C\',7(e){e.1f();$(\'#t\').r(\'\').2y(7(){$(\'#G, #15, #14, #P\').r(\'\');g($(8).O(\':2z\')){$(\'#G\').M()}})});$(\'#P\').2A({2B:+1,2C:\'\',});$(".2D").u(\'C\',7(){g($(8).6("1c").A("x")){$(8).6(\'1h\').R(\'2G\');$(8).6("1c").A({x:17});$(8).B("x").H("1j")}1a{$(8).6(\'1h\').R(\'1l\');$(8).6("1c").A({x:"x"});$(8).B("1j").H("x")}})});',62,168,'||||||children|function|this||||||||if|uF900||uFDF0|uFFEF|uD7FF|uFDCF|u00A0|mainform||url|val|myTooltip|tools|on|myUrl|myButton|checked|_||attr|removeClass|click|isNew|da|myMsg|custom|addClass|var|data|showMessage||focus|config|is|expire|fadeIn|text|selectText|myCustom|domain|true|myQrCode|300|hasClass|call|validate|qrTooltip|qrCode|matches|uses|password|return|false|submit|find|else|hide|input|document|normal|preventDefault|location|label|disabled|unchecked|send|private|msgCustom|success|myPrivate|http|https|myUses|loading|hidden|myPassword|myExpire|error|taken|msgValidDomain|chart|init|myAction|com|action|info|select|test|uF8FF|uE000|ftp|match|span|trim|change|100|ajax|type|post|setTimeout|is_private|paste|via|web|dataType|json|beforeSend|extend|already|name|Custom|status||valid|Write|apis|google|150|cht|qr|chs|100x100|chl|chld|css|backgroundImage|end|reset|href|qrcode|download|undefined|msg|alert|something|goes|wrong|reloading|window|reload|custom_link|fadeToggle|visible|datepick|minDate|showAnim|checkbox|typeof|ready|public|jQuery'.split('|'),0,{}))

2.jquery-1.7.1.min.js

http://urlsaf.com/js/libs/jquery-1.7.1.min.js

Short Hint

In my website have one feature that is, if you copied any url and paste into my input box its automatically short your url without clicking. It is XMLHttprequest based so chrome and other browsers are blocked this service. So how to disable this feature from my website. If you want any thing more please let me know..!

Was it helpful?

Solution

Buddy i think you need to enable cors on jQuery this is a cross domain option.

jQuery.support.cors = true;

And you need to set the response header to allow the other domain origin. in php is some like this

header('Access-Control-Allow-Origin: yourdomain.com'); 

or

header('Access-Control-Allow-Origin: *');   

For all domains.

Hope this work for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top