SAYNOTO0870.COM
Welcome, Guest. Please Login or Register.
Jul 29th, 2010, 7:01pm



Navigation: | Home | Help | Search | Login | Register
SAYNOTO0870.COM « suggestion: Create Firefox extension »


Pages: 1
suggestion: Create Firefox extension (Read 4384 times)
sbutton
Newbie
*




Posts: 3
Gender: male
suggestion: Create Firefox extension
May 26th, 2006, 9:59am
It would be really useful if you could just right click on a phone number (after highlighting it), and then pick "Look up saynoto0870..." and it goes off and finds the number you need.
 
There are similar Firefox extentions for "Look up definition of.." which goes off to an on-line dictionary, or "Search web for...." which goes off to your chosen search engine.
 
Another useful one is "Stumbleupon...", which really rocks.
 
Perhaps this is not the best place to suggest this, and I should be posting this in the Firefox forums.  
 
Any thoughts on this?
 
Steve
Back to top
 
« Last Edit: Sep 14th, 2006, 7:59pm by DaveM »  
  IP Logged
sbutton
Newbie
*




Posts: 3
Gender: male
Re: suggestion: Create Firefox extention.
Reply #1 - Jun 2nd, 2006, 10:07am
I guess no then?
 
Steve
Back to top
 
« Last Edit: Sep 14th, 2006, 8:00pm by DaveM »  
  IP Logged
Heinz
Supreme Member
*****


Money to burn?
 I haven't.
Please DUMP 1571

Posts: 1069
Re: suggestion: Create Firefox extention.
Reply #2 - Jun 2nd, 2006, 11:16am
As a user of Firefox, I'd support such a thing - but haven't a clue how it would be done.
 
Do you have the knowledge?
 
There is a problem though in that the Unverified Lists are now very large (possibly even larger than the Verified List) and, AFAIK, the 'Search for a number' facility only searches the Verified Lists.  
 
It would therefore be easy to assume you'd searched but you wouldn't have searched fully.
Back to top
 
 
Email   IP Logged
sbutton
Newbie
*




Posts: 3
Gender: male
Re: suggestion: Create Firefox extention.
Reply #3 - Jun 2nd, 2006, 11:38am
I'm not exactly sure how it would be done, but I have done a bit of programming in the past (like 5 years worth) so I should be able to figure it out... if 1) There is a demand ... 2) I can find the time. ... 3) There is not already something similar which can be "tweaked" to do the same thing (no point re-inventing the wheel)
 
I've posted a question http://forums.mozillazine.org/viewtopic.php?p=2292047#2292047 onto the mozillazine forums, and there is a discussion going on there about the TermBlaster extension to Firefox... but there is a problem. It seems that "right click" doesn't work on the saynoto0870 form. Perhaps someone here could shed some light as to why this might be??
 
Thanks,
 
Steve
Back to top
 
« Last Edit: Sep 14th, 2006, 8:01pm by DaveM »  
  IP Logged
mmmmmm
Newbie
*




Posts: 7
Gender: male
Re: suggestion: Create Firefox extention.
Reply #4 - Aug 19th, 2006, 2:00pm
I have adapted a common "linkify" script to convert 0870 numbers on websites into links. It works most of the time, but not always (for some reason or another). The unverified list is not checked.
 
Installation instructions:
 
1. Install the Greasemonkey Firefox extension http://greasemonkey.mozdev.org/
 
2. Copy and paste the following code into a file called 0870.user.js
 
Code:
// 0870 Linkify
// Inspired by: UPS Tracking Linkify (http://plutor.org/files/upslinkify.user.js) by Logan Ingalls
// and SunRocket VoIP Dial Linkify.
//
//
// ==UserScript==
// @name	     0870 Linkify
// @namespace	http://www.saynoto0870.com/
// @description    Looks for phone numbers in the page and hyperlinks them to saynoto0870.com search.
// @include	  *
// ==/UserScript==

(function () {
	  const trackRegex = /\b(0871|0870|0845|0844)([ \t\r\n]?\d){7}\b/ig;

	function trackUrl(t) {
		return "http://www.saynoto0870.com/numbersearch.php?number=" + String(t).replace(/\) /g, "-");
	}

    // tags we will scan looking for 0870 numbers
    var allowedParents = [
	  "abbr", "acronym", "address", "applet", "b", "bdo", "big", "blockquote", "body", 
	  "caption", "center", "cite", "code", "dd", "del", "div", "DIV", "dfn", "dt", "em", 
	  "fieldset", "font", "form", "h1", "h2", "h3", "h4", "h5", "h6", "i", "iframe",
	  "ins", "kdb", "li", "object", "pre", "p", "q", "samp", "small", "span", "strike", 
	  "s", "strong", "sub", "sup", "td", "table", "tr", "th", "tt", "u", "var"
	  ];
	
    var xpath = "//text()[(parent::" + allowedParents.join(" or parent::") + ")" + "]";

    var candidates = document.evaluate(xpath, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

    for (var cand = null, i = 0; (cand = candidates.snapshotItem(i)); i++) {
	  if (trackRegex.test(cand.nodeValue)) {
		var span = document.createElement("span");
		var source = cand.nodeValue;
		
		cand.parentNode.replaceChild(span, cand);

		trackRegex.lastIndex = 0;
		for (var match = null, lastLastIndex = 0; (match = trackRegex.exec(source)); ) {
		    span.appendChild(document.createTextNode(source.substring(lastLastIndex, match.index)));
		    
		    var a = document.createElement("a");
		    a.setAttribute("href", trackUrl(match[0]));
		    a.appendChild(document.createTextNode(match[0]));
		    span.appendChild(a);

		    lastLastIndex = trackRegex.lastIndex;
		}

		span.appendChild(document.createTextNode(source.substring(lastLastIndex)));
		span.normalize();
	  }
    }

})(); 


 
3. Copy and paste the following code into a file called 0870.html - save it into the same directory as 0870.user.js:
Code:
<a href="0870.user.js">Right click to install script</a> 


 
4. Open the html file in Firefox. Right click the link, then click "Install This User Script". A message should appear stating that installation was successful.
 
5. Test the functionality by visiting a website. Example: http://www.telephonesonline.co.uk/helpline.asp (a site chosen at random). The 0870 numbers should now be links that link to this site.
 
This script works for me, but I can't guarantee that it'll work for you. Hope this helps!
Back to top
 
 
  IP Logged
msuxg
Newbie
*




Posts: 1
Re: suggestion: Create Firefox extention.
Reply #5 - Sep 13th, 2006, 1:57pm
Sorry, I've come in late to this discussion, but a while ago I created a search engine pluging for Firefox users of this site.
 
It is available (along with one created by another author) to download from http://mycroft.mozdev.org/download.html?name=saynoto0870&sherlock=yes&op ensearch=&submitform=Search
Back to top
 
 
WWW | MSN | YIM | AIM   IP Logged
john s
Newbie
*




Posts: 1
Re: suggestion: Create Firefox extension
Reply #6 - Sep 25th, 2006, 1:04am
I use the "Advanced URL Builder" extension:
 
https://addons.mozilla.org/firefox/1399/
 
This lets you build a menu of various search engines and is easy to add your own (once you've worked out what you need to enter - and yes, that is me who left the feedback).
 
In this site's case, all you need to enter is:
 
http://www.saynoto0870.com/numbersearch.php?number=
 
Then select the number you're looking for, right click, and go from there. Note this only works for numbers. You'd need to adapt the above to search for company names.
 
This is my first post. Just want to say this is a great site and it's certainly proved useful to me recently. Good luck with the campaign!
Back to top
 
 
  IP Logged
Pages: 1

Website and Content © 1999-2010 SAYNOTO0870.COM. All Rights Reserved.
Written permission is required to duplicate any of the content within this site.


WARNING: This is an open forum, posts are NOT endorsed by SAYNOTO0870.COM,
please exercise due caution when acting on any info from here.


SAYNOTO0870.COM » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.