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 7993615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:54:23+00:00 2026-06-04T13:54:23+00:00

EDIT: Solution at bottom of post. I’ve got a custom GreaseMonkey script I made

  • 0

EDIT: Solution at bottom of post.

I’ve got a custom GreaseMonkey script I made that uses JQuery to filter out and modify certain feed items in my Facebook news feed. It’s been working great, but this particular one isn’t working properly:

$("h6.uiStreamHeadline:contains('shared') a[id^='js_']").html("someone else");

What this is supposed to do is replace the name of the page from which a particular item is being shared on my news feed. For example, when it says “John Smith shared Funny-Pictures-For-Everyone’s photo”, this function turns it into “John Smith shared someone else’s photo”.

Here are some of my other “filters”:

$("h6.uiStreamHeadline:contains('was tagged in')").closest("li").html("<li><i style='color:#CCCCCC;margin-left:15px;'>Post Hidden (someone tagged somewhere else)</i></li>");
    $("h6.uiStreamHeadline:contains('were tagged in')").closest("li").html("<li><i style='color:#CCCCCC;margin-left:15px;'>Post Hidden (multiple friends tagged somewhere else)</i></li>");
    $("h6.uiStreamHeadline:contains('commented on her own')").closest("li").html("<li><i style='color:#CCCCCC;margin-left:15px;'>Post Hidden (someone commented on their own stuff)</i></li>");
    $("h6.uiStreamHeadline:contains('commented on his own')").closest("li").html("<li><i style='color:#CCCCCC;margin-left:15px;'>Post Hidden (someone commented on their own stuff)</i></li>");
    $("h6.uiStreamHeadline .wallArrowIcon").closest("li").html("<li><i style='color:#CCCCCC;margin-left:15px;'>Post Hidden (Wall-to-Wall post)</i></li>");
    $("h6.uiStreamHeadline:contains('commented on a')").closest("li").html("<li><i style='color:#CCCCCC;margin-left:15px;'>Post Hidden (people commenting on something i probably don't care about)</i></li>");

These all work just fine and make their replacements when the page loads. However, the function in question does not update until I interact with it. For example, if the name on the page is “Funny-Pictures-For-Everyone”, after I put my mouse over it and Facebook’s little popup thing appears, then the name will change to “someone else”. I don’t know why it won’t change when the page loads. I wonder if it’s a timing issue, but I’m not sure what to do about it, and I’m not sure why all the rest would work.

I do understand that the function in question is a bit different from most of the rest. The rest of them replace the entire post using closest("li") and the one I’m having trouble with is only meant to replace the inner HTML or text within the <a></a> tags it is selecting.

Thanks in advance for any help.

I’ve come up with what seems to be a working solution to this issue:

As Brock Adams mentioned below, the ID attribute I was trying to select doesn’t exist in the element until I interact with it. So, I had to find something that was there on page load. I examined the inner HTML of the and discovered that the one element that I wanted to select was the only one that did NOT have a ‘class’ attribute, either before OR after interacting with it. Therefore, I’ve come up with the following that seems to work just fine:

$("h6.uiStreamHeadline:contains('shared') a:not([class])").html("someone else");

I <3 JQuery XD

  • 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-06-04T13:54:25+00:00Added an answer on June 4, 2026 at 1:54 pm

    The problem is that Facebook doesn’t assign an id (and a bunch of other crud) to that link until you mouse over it!

    The solution: Never use Facebook! Ever!… er, I mean, try a different approach for that filter. Perhaps:

    $("h6.uiStreamHeadline:contains('shared') > div.actorName > a").html("someone else");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Scroll down to bottom of post to find solution.) Got a asp.net page which
EDIT: Sorted. See bottom for solution Okay, I have to write a program that
Intro: EDIT: See solution at the bottom of this question (c++) I have a
Solution Edit: Turns out you can't use the PHP SDK to return the correct
Edit: I've got the solution and have described it a bit more at the
EDIT: Solution in code can be found on bottom. I am not sure if
Edit at bottom with solution I've seen a similar question to this posted before
Update: I found the solution, look in the bottom of this page... I've got
I'm having trouble figuring out the solution to this SQL query. Schema Edit :
EDIT : proper solution: void add(Student s) { if(root == null) root = new

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.