Remove the nasty ad verification code from the Chinese army

Source: Internet
Author: User

Like this link: http://www.onlinedown.net/softdown/17276_2.htm

Sometimes the verification code is annoying. You only need to enter numbers here. You have to enter the text in the advertisement too much.

Although huajun's ad verification code is novel and creative, it is too much. So I searched for "Remove the verification code".

Found: http://userscripts.org/scripts/show/129215 [onlinedown. No. Ads-remove the verification code and advertisement on the download page of huajun Software Park]

Go to install in the upper-right corner of the website, and click Download JS file to open

Google Chrome ExtensionProgramPage, drag JS into, automatically installed, great.

Chrome automatically generates an extension

For example:

% USERPROFILE % \ appdata \ Local \ google \ chrome \ User Data \ Default \ extensions \ kooplkpgddpimbhcbkmpknimodcdkpol \ 1.0 _ 0

Automatically add a manifest. JSON File

The content is as follows:

 { "content_scripts" : [{ "exclude_globs" :[],  "exclude_matches" : [], " include_globs ":[], " JS ": ["script. JS "], " matches ": [" http: // * .newhua.com/softdown/* "," http: // * .onlinedown.net/softdown/* "], " run_at ":" document_idle "}], " converted_from_user_script ":  true  ," Description ":" onlinedown. no. ads "," key ":" pugrganvmwl4d5ucerxxspiupaj8lgfc81_k0oueh4 = ",  "name": "onlinedown. no. ads "," version ":" 1.0 "} 

The original Javascript file header has the following statement:

 
//= Userscript =//@ Name onlinedown. No. Ads//@ Namespace onlinedown. No. Ads//@ Description onlinedown. No. Ads//@ Version 2.01//@ Match http: // * .onlinedown.net/softdown /*//@ Match http: // * .newhua.com/softdown /*//==/ Userscript =

Therefore, chrome automatically obtains extension information from the JS file before it can be installed.

Thanks: http://opengg.me/lufu love, it seems that he has an opengg. Clean. Player, can be Youku five or six to the video to remove the advertisement, in fact, is to replace the SWF file.

 

Javascript: Alert ('helloworld'); Return 0; similar method should be used to load a remote JS file to a script JavaScript through createelement. I will not study

 

Again, we despise websites or companies that are too much.

If there are not many JS files, I will post them to learn:

View code

 //  = Userscript =  //  @ Name onlinedown. No. Ads  //  @ Namespace onlinedown. No. Ads  // @ Description onlinedown. No. Ads  //  @ Version 2.01  //  @ Match http: // * .onlinedown.net/softdown /*  //  @ Match http: // * .newhua.com/softdown /*  //  ==/ Userscript = ( Function  (){ 'Use strict' ;  VaR Utils ={Isarraylike:  Function  (OBJ ){  If ( Typeof OBJ! = 'Object' ){  Return   False  ;}  VaR Types = ['array', 'nodelist', 'htmlcollect' ];  For ( VaR I = 0; I <types. length; ++I ){  If (Object. Prototype. tostring. Call (OBJ). indexof (types [I])! =-1 ){  Return   True  ;}}  Return   False  ;}, Foreach:  Function  (ARR, callback ){  If (( Typeof Arr = 'object') & utils. isarraylike (ARR )&& Utils. isfunction (callback )){  For ( VaR I = 0; I <arr. length; ++ I) {callback. Call (ARR [I], arr [I]);}  Return  ;}  If (( Typeof Arr = 'string ')&& Utils. isfunction (callback) {arr =Document. queryselectorall (ARR); utils. foreach (ARR, callback) ;}}, remove:  Function  (DOM ){  If ( Typeof DOM = 'string' ) {Utils. Remove (document. queryselectorall (DOM ));  Return  ;}  If (( Typeof DOM = 'object ')&& Utils. isarraylike (DOM) {utils. foreach (DOM, Function  () {Utils. Remove (  This  );});  Return  ;}  If (DOM & Dom. parentnode && Dom. parentnode. removechild) {Dom. parentnode. removechild (DOM) ;}, die:  Function  (DOM, arr ){  If ( Typeof DOM = 'string') {Utils. Die (document. queryselectorall (DOM), arr );  Return  ;}  If (( Typeof DOM = 'object ')&& Utils. isarraylike (DOM) {utils. foreach (DOM,  Function  () {Utils. Die (  This  , Arr );});  Return  ;} VaR Attrs = ['onclick', 'onsubmit ', 'style', 'onmouseover', 'onmouseout' ];  If (ARR && Utils. isarraylike (ARR) {attrs = Attrs. Concat (ARR);} utils. foreach (attrs,  Function  (){  If (DOM && Dom [a]) {  Try  {Dom [A] =Null  ;}  Catch  (E ){}}  If (DOM && Dom. removeattribute) {Dom. removeattribute (a) ;}}, addcss:  Function  (STR ){  VaR Style = Document. createelement ('style' ); Style. textcontent = STR; document. Head. appendchild (style) ;}, isfunction: Function  (Func ){  Return   Typeof Func = 'function' ;}, Proxy:  Function  (Callback ){  VaR Script = Document. createelement ('script' ); Script. textcontent = 'Try {('+ callback. tostring () +') ();} catch (e ){}' ; Document. Body. appendchild (SCRIPT) ;}, tips:  Function  (){ VaR Html = '<Div class = "tips_container"> onlinedown. no. ADS \ u5df2 \ u542f \ u7528 & emsp; <a href = "http://opengg.me/760/onlinedown-no-ads/" style = "color: blue "target =" _ blank "Title =" \ u6709 \ u95ee \ u9898 \ u70b9 \ u6b64 \ u53cd \ u9988 "> \ u53cd \ u9988 </a> & emsp; <a href = "http://opengg.me/donation/" style = "color: red "Title =" \ u6211 \ u8981 \ u6350 \ u52a9 \ u6b64 \ u9879 \ u76ee "target =" _ blank "> \ u6350 \ u52a9 </a> </div>' ;  VaR CSS = '. tips_container {position: fixed; top: 2em; Right: 2em; color: green; opacity: 0.4; Background: # FFF; padding: 10px }. tips_container: hover {opacity: 0.9 }. tips_container # togglegoogle {color: red; cursor: pointer }' ; Utils. addcss (CSS );  VaR DIV = Document. createelement ('div' );  //  Div. style. Position = 'relative '; Div. innerhtml = HTML; document. Body. insertbefore (DIV, document. Body. childnodes [ 0 ]) ;}}; Utils. Tips (); utils. addcss ( '. Checkbackground,. down_verify {display: none! Important }' ); Utils. Die ( '. Title +. urlist A', ['href' ]); Utils. Proxy (  Function  () {Showdownlist ( 2, 'checkok') ;};}) (); 

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.