A JavaScript class that forces pop-up windows: Forcewindow

Source: Internet
Author: User
Tags define object net return window
javascript|window| pop-up window A pop-up window that can not be intercepted by the ad interceptor, see address: http://www.iecn.net/forum/showthread.php?s=&threadid=14903
The ForceWindow.iclass.js code is as follows (use, explain, explain all in the comments):

------------------------------------------------------------------------------------
/**
 * = = = = = = ===================================================================
 * This program is free to reproduce, modify, propagate, and shall not delete the following information. Used for commercial use subject to the consent of the original author.
 * =========================================================================
 * Program Name: Forcewindow (@iClass. JS)
 * Description: "Break" ad interception software, forced pop-up window.
 * version: 1.0.0
 * Date Created: January 19, 2004
 * modified: January 19, 2004
 * file name: ForceWindow.iclass.js
 * Author: Zhongzhong
 * mailbox address: zz@iecn.net
 * Copyright notice: This procedure belongs to the Iclass.js, copyright is owned by the author.
 * about IClass plans for details: http://www.iecn.net/forum/showthread.php?threadid=14811
 * =========================================================================
 */

/**
* Define Forcewindow class constructors
* No parameters
* No return value
*/
function Forcewindow ()
{
THIS.R = document.documentelement;
THIS.F = document.createelement ("FORM");
This.f.target = "_blank";
This.f.method = "POST";
This.r.insertbefore (THIS.F, this.r.childnodes[0]);
}

/**
* Define Open method
* Parameter sURL: string, to open the URL of the window.
* No return value
*/
ForceWindow.prototype.open = function (sURL)
{
This.f.action = sURL;
This.f.submit ();
}

/**
* Instantiate a Forcewindow object and act as a child object of the Window object to facilitate the invocation of the
* This can be used after the definition: Window.force.open ("URL");
*/
Window.force = new Forcewindow ();

/**
* Use this program pop-up window will not be intercepted by the ad interception software, but there is a disadvantage: you can not like the Window.Open pop-up window to customize the appearance.
* You can, of course, instantiate a Forcewindow object before using it:
* var Mywindow = new Forcewindow ();
* To use this:
* Mywindow.open ("URL");
* This program test through the browser: IE 5+, Firefox 1.0, Mozilla 1.7.5, Netscape 7.2, Opera 7.23
* Tips: If you use this program to force pop-up ads, please think more about the feelings of visitors!
*/
------------------------------------------------------------------------------------



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.