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

  • Home
  • SEARCH
  • 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 3680376
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:34:10+00:00 2026-05-19T03:34:10+00:00

I’m using KRL to inject elements into twitter timeline statuses similar to Jesse Stay’s

  • 0

I’m using KRL to inject elements into twitter timeline statuses similar to Jesse Stay’s TwitterBook. The problem I have is that these elements are only associated with statuses that are currently visible when the bookmarklet is initiated. If a new status is added through the ‘new tweet’ updated via Ajax or through status updates via infinite scroll, these new statuses are untouched.

Is there a way to either poll for new statuses or sense a twitter status update event via KRL in order to inject elements only into those newly added statuses?

  • 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-19T03:34:11+00:00Added an answer on May 19, 2026 at 3:34 am

    The example posted at

    http://kynetxappaday.wordpress.com/2010/12/25/day-21-modifying-facebook-stream-with-kynetx/

    works with the Facebook stream but the concept is the same

    • create setTimeout infinite loop to look for stream items
    • only select stream items not marked as processed
    • process stream items
    • rinse and repeat

    Code example from post

    ruleset a60x512 {
      meta {
        name "MikeGrace-status-update-translator"
        description <<
          MikeGrace-status-update-translator
        >>
        author "Mike Grace"
        logging on
      }
    
      global {
        datasource insult:HTML <- "http://www.pangloss.com/seidel/Shaker/index.html?" cachable for 1 second;
      }
      rule find_status_updates_by_mike_grace {
        select when pageview ".*"
        {
          notify("Starting to look for status upates by Mike Grace","");
          emit <|
    
            // get app object to raise web events
            app = KOBJ.get_application("a60x512");
    
            // function that finds FB status updates by Mike Grace
            function findMikeGrace() {
    
              // loop through each stream item on the page that hasn't been processed already by the app
              $K("li[id^=stream_story]:not(li[kfbt])").each(function() {
                var currentStreamItem = this;
                // grab the current stream item posters name
                var name = $K(currentStreamItem).find(".actorName").text();
    
                // mark the stream item as being processed to reduce future processing times
                $K(currentStreamItem).attr("kfbt","y");
    
                // is the stream item by the perpetrator?
                if (name == "Michael Grace") {
    
                  // strikethrough the original update
                  $K(currentStreamItem).find(".messageBody").wrap("<strike />");
    
                  // get selector to return translation of status update
                  var returnSelector = $K(currentStreamItem).attr("id");
                  returnSelector = "li#"+returnSelector+" .messageBody";
    
                  // raise web event to get translation for non geeks
                  app.raise_event("get_insult", {"returnSelector":returnSelector});
    
                } // end of checking name
    
              }); // end of looping through unprocessed stream items
    
              // call myself again later to process new items on the page
              setTimeout(function() {
                findMikeGrace();
              }, 9000);
            }
    
            // start the process of finding the perpetrator
            findMikeGrace();
          |>;
        }
      }
    
      rule get_insult {
        select when web get_insult
        pre {
          selector = event:param("returnSelector");
          insulter = datasource:insult("#{selector}");
          foundInsult = insulter.query("font");
          singleInsult = foundInsult[0];
        }
        {
          emit <|
            console.log(singleInsult);
            $K(selector).parent().after("<br/>"+singleInsult);
          |>;
        }
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I have thousands of HTML files to process using Groovy/Java and I need to
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.