473,386 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to traps change on facebook page?

Sorry for my English. Can you help me please! I'm very newbie on coding. I want this code loads on every changes (status, tab,feed,etc) and can replace class element on my facebook pages

Expand|Select|Wrap|Line Numbers
  1. var words={"Masukkan Kembali":"Asupkeun deui","yang":"nu","":""};
  2. //////////////////////////
  3. // prepareRegex by JoeSimmons
  4. //////////////////////////
  5. String.prototype.prepareRegex = function() {
  6. return this.replace(/([\[\]\^\&\$\.\(\)\?\/\\\+\{\}\|])/g, "\\$1");
  7. };
  8.  
  9. function isOkTag(tag) {
  10. return (",pre,blockquote,code,input,button,textarea".indexOf(","+tag) == -1);
  11. }
  12.  
  13. var regexs=new Array(),
  14.     replacements=new Array();
  15. for(var word in words) {
  16. if(word != "") {
  17. regexs.push(new RegExp("\\b"+word.prepareRegex().replace(/\*/g,'[^ ]*')+"\\b", 'gi'));
  18. replacements.push(words[word]);
  19. }
  20. }
  21.  
  22. var texts = document.evaluate(".//text()[normalize-space(.)!='']",document.body,null,6,null), text="";
  23. for(var i=0,l=texts.snapshotLength; (this_text=texts.snapshotItem(i)); i++) {
  24.     if(isOkTag(this_text.parentNode.tagName.toLowerCase()) && (text=this_text.textContent)) {
  25.     for(var x=0,l=regexs.length; x<l; x++) {
  26.     text = text.replace(regexs[x], replacements[x]);
  27.     this_text.textContent = text;
  28.     }
  29.     }
Aug 12 '10 #1
1 1576
RamananKalirajan
608 512MB
Add the function call on body onmouseup and onkeyup. So that for each and every action you will get the script triggered.

Thanks and Regards
Ramanan Kalirajan
Aug 13 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: laurie_davis37 | last post by:
how do i change my home page i was with another isp and just changed to a new one now in internet opt i can't change my home page because the area is grey any advice as to how i change this or...
2
by: Sean McKaharay | last post by:
I want to find out how I can change the page orientation of a printer.
1
by: Greg | last post by:
In my ASP.NET application I have a button that when pressed, data needs to be saved based on what the user typed in. I have other controls on the same page that should be updated as a result of the...
3
by: Craig Wilson | last post by:
How do I programmatically change the page title in ASP.Net In general, I need to get at the object model that gets access to the title property. best wishes,
2
by: Paul | last post by:
Hi I am adding a splash page to a large .net application, just wondering if there is a way to deploy this to the server without rebuilding it, would have to add the splash page to the server and...
1
by: jaffar | last post by:
hi, I am using Tab control, i added the tab pages , i want to change the tab pages color when ever i select the tab page, i have tabpage1,tabpage2,tabpage3 i mean when ever i select the tab...
9
by: ad | last post by:
Hi, How can I dynamically change the MasterPager of a web page?
1
by: jessicahagg | last post by:
Hi, Goal: Change report body background color to white at runtime before exporting to pfd format. I am reproducing a web report useing .Net reportviewer -- The report is to have the same...
7
by: CF FAN | last post by:
need logic so when the page is refreshed that it returns to the location of the change, not to the top of the page. Currently, when the page is refreshed, it takes you back to the beginning of...
5
by: Murray | last post by:
Forgive me if this question is too basic, but I'm new to ASP.NET programming, and I can't locate a simple answer to this question. I have a web page that consists of a Master Page and a single...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.