Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6529145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:36:08+00:00 2026-05-25T09:36:08+00:00

I have this problem with a script not executing on mobile twitter. I have

  • 0

I have this problem with a script not executing on mobile twitter. I have tried it on many versions of Firefox including FF5, FF8, and FF9.

I have used the latest versions of Greasemonkey. Right now I have FF9 with GM 0.9.10. I do not have any problems executing the script on the normal twitter but on mobile it does not work. Maybe has something to do with HTTPS?

Here is the script:

// ==UserScript==
// @name           Twitter Mobile
// @namespace      http://www.test.com
// @include        https://mobile.twitter.com/*
// @require        http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==

function MainLoop() {

if(typeof unsafeWindow.jQuery == 'undefined') {
    window.setTimeout(MainLoop, 100);
    return;
}

var $ = unsafeWindow.jQuery;

$(document).ready(function(){
          //do something here
});
window.setTimeout(MainLoop, 2000);
}

MainLoop();

I have tried everything possible. Also, checked the @require alternatives and tried them. I do not know why it refuses to execute.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:36:08+00:00Added an answer on May 25, 2026 at 9:36 am

    All that MainLoop stuff is not required, and also forcing the wrong instance of jQuery.

    Please do the following:

    1. Switch back to the latest stable version of Firefox (Currently version 6).

    2. Delete everything after // ==/UserScript== in the script except the //do something here part.

      1. Do not use unsafeWindow.jQuery.
      2. You do not need any $(document).ready calls; Greasemonkey executes at the proper time by default.
      3. Delete the current setTimeout() calls; they are counter productive.

    3. Change the @require directive to:

      // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
      

    4. Paste or link to the complete script! The current script is probably failing mostly because it’s checking for something on the page that is AJAXed-in.
      get around that with code like this:

      //--- This handles both page-load delays, and AJAX changes.
      setInterval (function() { checkForTweetbox (); }, 500);
      
      function checkForTweetbox () {
          var tweetbox = document.querySelector ('div.tweet-box textarea');
          if (tweetbox) {
              if (! tweetbox.weHaveProcessed) {
                  tweetbox.weHaveProcessed    = true;
                  alert ('New tweet-box found!');
              }
          }
      }
      

    In fact, this script works perfectly well:

    // ==UserScript==
    // @name            _mobile twitter
    // @include         https://mobile.twitter.com/*
    // @require         http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
    // ==/UserScript==
    
    setInterval (function() { checkForTweetbox (); }, 500);
    
    function checkForTweetbox () {
        var tweetbox = document.querySelector ('#message_text');
        if (tweetbox) {
            if (! tweetbox.weHaveProcessed) {
                tweetbox.weHaveProcessed    = true;
                tweetbox.value              = 'GM\'s jQuery version is: ' + $.fn.jquery;
            }
        }
    }
    

    If you are logged into twitter mobile, it will preload a tweet in the message box (but not send).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this .bat script which I use to maven package my application. Problem
I have this html code <html> <head> <title>JQuery Problem 2</title> <script type=text/javascript src=jquery-1.4.min.js></script> <script
i have this problem: ms-access could not delete and i found a potential solution
I have a problem, e am executing a R script from php via command
I have this problem I'm hoping someone knows the answer to. I have an
I have this problem where I open Visual Studio and the internal windows are
i have this problem to find a particular xml node l have post this
I have this problem I've been trying to tackle for a while. I have
I have this problem in my ASP.NET application where I'm seeing some of my
I have this problem that my sites uses alot of ajax and when a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.