www.webdeveloper.com
Results 1 to 3 of 3

Thread: beginner writing userscript...

Hybrid View

  1. #1
    Join Date
    Oct 2011
    Posts
    2

    beginner writing userscript...

    Okay, I have zero experience in writing javascript, so what I have is basically copypasted from other sources.

    I'm trying to make a window close immediately after opening a specific site (in this case, tumblr.com).

    Code:
    // ==UserScript==
    // @name           726366
    // @description    Closes tab immediately after opening tumblr.
    // @include        http://*.tumblr.com*
    // ==/UserScript==
     
    self.close();
    Nothing happens. I have also tried window.close();

  2. #2
    Join Date
    Oct 2011
    Posts
    3
    Hi,

    I'm not so sure what is your scenario you''re trying to implement.

    How do you open 'tumblr.com'? Is it by href links, javascript function?

    in other words what triggers opening stumblr.com?

    try to read more here:
    http://blogs.x2line.com/al/articles/350.aspx

    or just google window.close.

    Asaf.

  3. #3
    Join Date
    Oct 2011
    Posts
    2
    Given the website is opened through an href or through the address bar.

    That site is blocked from here. i'll look at it later

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles