Bookmarklet Script For Catching Scammers (Mafia Wars / Facebook)

Dec 10, 2009

It would be easier to explain this if you play mafia wars (or any game that includes intra-game exchange of gifts/items between members) but the actual scripting doesn't require any knowledge of the game.

Background Information
Mafia Wars is a game on Facebook (and myspace, yahoo etc.) that among other things allows its players to send gifts to each other. Now because different people end up with more things of one type and are short of things of another type, the players have evolved a trading dynamic. Where x number of Item 1 is traded for y number of Item 2. A simple marketplace. And with this territory come scammers.

Essentially a player who doesn't go through with his end of the deal. good player sends item to bad player. bad player removes good player from mafia and blocks him for ever contacting him through his facebook profile. This has given rise to my group, among many others, that lists these scammers (identified with their facebook profile ids) as they are reported every day. Now over time the list has grown and it has become difficult and unrealistic to expect people to know who is on the list and who is not.

The Requirement
A javascript bookmarklet (there are many already servicing different needs of the players) that sits on the browser and tells the user if the person he is about to trade with is a listed scammer or not.

The Breakdown
The user will click the bookmarklet when he is on the facebook profile of the person he is about to trade with. When clicked the script will pull the facebook profile id from the current page, and then scan a text file located on a third-party server and return with a pop-up box message that reports if the id is listed as a scammer or not.

View 6 Replies


ADVERTISEMENT

JS Detect IE4 Without Catching IE5.0

Jul 23, 2002

Has anyone tried working out this one?

How to detect IE4 without wrongly detecting IE5.0 (IE5.0 usually returns a navigator.appVersion of 4.0)

Here's the code im working with using substring of IE version:

// <head>
<script language="JavaScript">
this.version = navigator.appVersion;
</script>


// <body>
<script language="JavaScript">

if (navigator.appName == "Microsoft Internet Explorer"){
if (version.substring(0,1) <= 4){
if (version.substring(22,23) <= 4){
document.write("This Browser is IE4 or lower!");
}
else{
document.write("This Browser is IE5 or higher!");
}
}
}
else{
document.write("This Browser isn't IE!");
}

document.write("<br>This Browser is " +version);
</script>

The version string usually return's something like this:

4.0 (compatible; MSIE 5.0; Windows 98; DigExt)

Can anyone see any problem with using this method?

View 2 Replies View Related

Catching Keypress In Canvas Tag

Jun 22, 2006

I am trying to catch keypresses in my canvas tag, but it appears that
that is not valid.

I may try to just create a hidden input box that will allow me to catch
keypresses.

I am trying to write a very simple asteroids game for a presentation on
Ajax in July, to show that javascript can do more than it was able to a
couple of years ago.

View 3 Replies View Related

JQuery :: Catching When A Div Is Updated Through Js

Sep 18, 2009

Is there a way to catch when a div content is updated through javascript? I update a div content through rjs and I need to call tablesorter every time the div is updated.

View 3 Replies View Related

Catching Information From Other Frame

Apr 18, 2005

Can I get information from other frame, like form values or variables?

View 5 Replies View Related

Catching Events In A Seperate Frame ?.....

Jul 23, 2005

I have a main page ('index.php') with an iframe ('mainframe') on the
left hand side. All the links on the index page load a new page of
mainly text content into the iframe.

All pretty straightforward, but I am using some javascript to launch
and hide a floating div on the index page (if I launch it in the
iframe, it will be restricted to the height and width of that frame).
The code to show / hide the div is located on the page index.php - say
the function is called 'showMe()', I would call top.showMe() to launch
the div.

The Div works fine, but when I try and catch an event via:

event.srcelement

it returns the error message 'object required', because it is being
passed from a link on a totally seperate page (the iframe)...

Is there any method for the main page (index.php) to catch the event
on 'mainframe' that triggers the div ?

The div's do show up and hide, and I can load source content into them
- only error messages keep flashing up on IE (but not on Netscape /
Firefox, etc).

View 1 Replies View Related

JQuery :: Catching All PostBack Events?

Jul 15, 2011

How may I catch all postback events which are triggered by all controls using jQuery in an ASPX page?

I am using the below provided code and displaying an alert window when any control posts back to the server, however not all postbacks are getting caught by the highlighted code.

protected void Page_Load(object sender, EventArgs e)
{
if (Request.ServerVariables["REQUEST_METHOD"] == "POST" || Request.ServerVariables["REQUEST_METHOD"] == "GET")

[Code].....

View 2 Replies View Related

Webkit - Catching Uncaught Errors?

Oct 1, 2009

I want window.onerror type functionality in webkit.

Is there any way of doing this?

My best attempt was:

Code:

Which breaks Chromes console, but doesn't get triggered for internal errors (e.g. reference errors).

I'm trying to implement a php style __autoload.

Essentially I think it's possible to

-Catch the error
-Find out the name of the object which isnt referenced
-Try to include a JS file with the same name

View 1 Replies View Related

Sending Out Of Iframe And Catching In Parent?

Apr 1, 2009

I have a page contained in an iframe. The page contained in the iframe shows videos all the time.Each video has an id that changes when a new video is played.I need to be able to catch this changing id in the page that has the iframe (the parent page) and that is hosted in a different server from the contained page.The only languages that can be used in the contained page are javascript, ajax and jquery
In the parent page you can use these languages + php.

I'm not posting the contained page code just because, believe me, it's humongous,full of variables and functions from other files and modules.The only thing needed there is a variable, myid, that stores the new id when a new video is played.Then I have to post, send, throw ... etc. myid and after that catch it in the parent page, remembering that myid's value changes when a new video is played and that.I have to get that new value at all times.I have to get the value of the playing video id to do things like changing the background of the page depending on the video played or showing a webpage depending on the video played ... and so on.

View 2 Replies View Related

Ajax :: Catching Errors From A Reply Handler?

Jan 11, 2010

I'm sure someone has written about this, but my google-fu is utterly failing me!Say I make an ajax request:

javascript Code:
Original
- javascript Code
errQueryFailure = new Error ("Server query failure");

[Code]...

View 3 Replies View Related

Bookmarklet

Jan 21, 2007

I have a bookmarklet which copies a marked set of characters into a searchpage in our dictionary. If nothing is copied, a window opens where you can type a word.

BTW, it is for firefox 2.0.

javascript:s=window.getSelection();if(s=='')for(i= 0;i<frames.length;i++){s=frames[i].document.getSelection();if(s)break;}if(!s)void(s= prompt('some
text.',''));if(s){test=open('URL/search.pl?searchphrase='+escape(s));test.focus();}
This works well.

We have another search /command which needs to be finished with &search= after the searchphrase

searchphrase="here comes the markedtyped set of characters"&search=

Can anyone of you help me changing the bookmarklet or point me to a site where I can read more about this?

View 1 Replies View Related

JQuery :: Select Option Not Catching Mousedown Event In IE And Chrome

Jul 2, 2009

This is the code I am using to test this. In FF and Op. When I click on an option in the select box, the alert pops up. In IE and Chrome, it doesn't seem to catch it at all.
$('.clickopt').mousedown(function(){
alert("test");
});

View 2 Replies View Related

Catching <a> Link Click - Fancy Box - Show The Larger Images

Mar 19, 2011

Catching <a> link click - Fancy Box I have an example here of the simple image gallery I'm working with. The thumbnails are loaded from an XML and are linked to larger images. untitled I want to use Fancy box Fancybox - Fancy lightbox alternative to show the larger images. I have fancy box working on other sites but can't get it to work here. In an attempt to work out why it's not working I tried to capture the click on the <a> link, but that won't work.

[Code]...

View 3 Replies View Related

Interactive Bookmarklet?

Jun 22, 2007

Is there a way to create a bookmarklet that discerns the shift (or
ctrl) key state at the time the javascipt is launched?????

View 1 Replies View Related

Bookmarklet For Random Url

Jul 20, 2005

I've found examples of bookmarklets that select a URL from a page at
random, but I'd like one that generates part of the URL at random.

If you have a bunch of images that are named:
mydomain.com/images/abcd.jpg where abcd is can be any combination of 4
lowercase letters - is there a way of having the bookmarklet generate
the letters randomly when clicked?

I'm able to do it using AppleScript & Safari but would like it to work
from within Safari - which is missing the "Scripts" menu that most Apple
apps have :(

It looks as if bookmarklets are the only option, but I've only ever used
javascript to select randomly from existing arrays of images and don't
fancy typing in the names of a couple of thousand images...

View 5 Replies View Related

Reader Bookmarklet...

May 6, 2003

Download the attached file, rename it read.html and open it. Drag the "read" link onto your Favorites|Links toolbar, and acknowlege the warning dialog. Then, from anyone's page, click the "read" bookmarklet and read along with it.

My basic premise is that vowels and digits make for a place to pause momentarily (90ms) during reading. If it reads too fast or slow, you can adust the delay factor accordingly.

I haven't tested this on other browsers yet.

View 4 Replies View Related

Catching Bug - Visual Basic And Firebug - Code Doesn't Work On Any Browser

Aug 3, 2011

If visual basic and firebug doesn't show me any error and if code doesn't work on any browser...so what should i do. I did a little boring - to read my code again to find a simple syntax errors like - writte() for exemple.

But even that does not give me anything! Is there any good recomendations how to change it all?

Look at this code:

Browser gives me out only - Please enter a valid name

View 1 Replies View Related

Escaping Bookmarklet Code

Nov 13, 2006

When publishing bookmarklets, we put the bookmarklet code in anchor tag
like this:

<a href="javascript: alert('test');"name </a>

Some characters of the code need to be escaped. For example, double
quotes need to be escaped as %22 like in this example:
<a href="javascript: var doubleQuote = '%22' alert(doubleQuote);">
name </a>

Question: Is double quotes the only thing that need to be escaped?

I have seen examples of escaping spaces as %20, but it seems
unnecessary in most browsers i have used.

View 1 Replies View Related

Javascript Bookmarklet For Del.icio.us

Mar 3, 2007

I'm using the following javascript bookmarklet for creating del.icio.us posts, and it works fine, but i've been trying to augment it with "document.getSelection" and have not gotten it to work.

the code is:
javascript:q=location.href;p=document.title;void(open('http://del.icio.us/fogboy?v=3&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'delicious%20',%20'toolbar=no,width=740,height=700'))

and it works fine (to test of course you'd have to change the del.icio.us username in there), except it doesn't have the "document.getSelection" syntax which would make it so highlighted text on a page was put in the "notes" field. i've tried about 5 different ways of writing that, based on other versions i've seen around. i would love to know exactly the right syntax to use to get this working.

View 1 Replies View Related

View-Source Bookmarklet

Apr 15, 2003

I didn't know about this until a few hours ago. I thought it was cool, so I thought I'd share it.

I got the code from brothercake, although I did add a few tweaks to it.

Just save this as a bookmark, and you can view the source of any site with just a click (even "protected" sites :rolleyes: )


javascript:var newWin=window.open(); newWin.document.body.innerHTML=('<b style="font-family:Verdana; font-size:9pt;">Source of '+location.href+'</b><br><br><br><xmp style="font-family:Verdana; font-size:8pt; color:#000080;"><html>'+document.getElementsByTagName('html')[0].innerHTML+'</html></xmp>'); newWin.select(); newWin.focus(); void(0);


Just remember to remove the space in "javascript:"

View 13 Replies View Related

Open Bookmarklet In New Window?

Oct 6, 2010

I found this bookmarklet which I'm using in Firefox Would anyone here be willing to modify it to display its results in a new tab, instead of using the current tab?

Code:
javascript:q = "" + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (!q) q = prompt("You didn't select any text. Enter a search phrase:", ""); if (q!=null) location=("http://www.google.com/search?num=100&q=site:" + escape(location.hostname) + " "" + escape(q.replace(/"/g,"")) + """).replace(/ /g, "+"); void 0

View 1 Replies View Related

Document.body.outerHTML Via Bookmarklet

Aug 11, 2006

I'm trying to create a bookmarklet on IE6, that passes the outerHTML of the body element as a GET param my site.

The problem is that for some page (ie mail.yahoo.com) the bookmarklet does not work while for other pages (simpler ones) it does work....

View 2 Replies View Related

Turn Bookmarklet Into Greasemonkey Script

May 6, 2007

javascript:(function(){var k,x,t,i,j,p; for(k=0;x=document.links[k];k+
+){t=x.href.replace(/[%]3A/ig,':').replace(/[%]2f/
ig,'/');i=t.lastIndexOf('http');if(i>0){ t=t.substring(i);
j=t.indexOf('&'); if(j>0)t=t.substring(0,j); p=/https?://[^
s]*[^.,;'%22>s)]]/.exec(unescape(t)); if(p) x.href=p[0]; } else if
(x.onmouseover&&x.onmouseout){x.onmouseover(); if (window.status &&
window.status.indexOf('://')!=-1)x.href=window.status;
x.onmouseout(); } x. x. }})();

View 1 Replies View Related

Bookmarklet With Safari (windows Version)

Jun 12, 2007

I have bookmarklets with a # in their urls but safari changes the
# to %23. And unfortunately, the bookmarklet does not work with %23.
You need to change it back manually to #.

View 3 Replies View Related

Make Bookmarklet Open In New Window?

May 21, 2009

I need this bookmarklet (below) to open in a new window and display the info there. It needs to work in both FF and IE. It would be in one line in the bookmarklet but I expanded it for readability. It should work against our site: [URL]

[Code]...

View 2 Replies View Related

Dictionary Bookmarklet To Open In New Window

Aug 6, 2010

How could I make this useful dictionary bookmarklet open in a new window?

javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=''){ location.href='http://translate.google.com/translate_t?text='+t+'&hl=en&langpair=auto|en&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+escape(location.href)+'&hl=en&langpair=auto|en&tbb=1&ie='+e;};

Its the "To English" bookmarklet as featured on lifehacker (http://lifehacker.com/5168984/to-english-bookmarklet-quickly-easily-translates-any-text-with-one-click).

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved