+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Craigslist G1 email problem Need a possible script maybe to fix problem with Oilcan

  1. #1
    Join Date
    Dec 2008
    Posts
    5

    Default Craigslist G1 email problem Need a possible script maybe to fix problem with Oilcan


    This is the problem, I just copied it from another post:
    "I saw one post on here about it, but no explanation. Whenever I 'click' on an email link on CL from my G1, it opens a new email with an address that is something"@gmail.com", whereas CL emails should be something"@craigslist.org". I can't figure out why it does this, or how to fix it. Does anyone know? My wife is looking to get a G1 tomorrow, but she uses CL constantly, and if this is fixable, it's a deal-breaker on the G1...


    Also, how do you make it put the post title in the subject of the email like on a computer, or can you?

    Sorry if I missed a post explaining this, first time/post on the board...

    Any help is MUCH appreciated!

    Thanks "
    If someone could help and write a script, I think it could fix it by using OILCAN app for the Android. This app in not in the Market place but can be downloaded from this site.

    http://oilcan.jsharkey.org/

    Even if the script can take out everything but the email I guessing that would work.

  2. #2
    Join Date
    Nov 2008
    Location
    Albuquerque NM
    Posts
    628

    Default Re: Craigslist G1 email problem Need a possible script maybe to fix problem with Oilc

    Yeah, I have noticed this as well as I use CL quite a bit.

    Once the link opens the email app...you can change it to @craligslist.org. its annoying but doesn't take all that much effort, so I would not call it a deal breaker

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Black G1 Adopted 11/07/2008
    Rooted w/cyan 4.2.15.1
    Theme: Stock

    White MT3G Adopted 10/28/2009
    Rooted w/King's 2.1 v1.7.1
    running smooth
    Theme: Nexus Launcher

  3. #3
    Join Date
    Nov 2008
    Location
    Queens, NY
    Posts
    150

    Default Re: Craigslist G1 email problem Need a possible script maybe to fix problem with Oilc

    I just did some tests and it seems to be related to the subject part of the mailto link. Might be a bug in Android itself.
    JayBachatero
    G1 - JF 1.5 Build; Apps to SD

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.


    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.



    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Originally Posted by ickyfehmleh
    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Are you the kind of person that doesn't donate anything (code, money, time, hardware, bandwidth) back to the community? A technology welfare recipient?

  4. #4
    Join Date
    Dec 2008
    Posts
    5

    Default Re: Craigslist G1 email problem Need a possible script maybe to fix problem with Oilc

    That what I heard on other sites also JayBachatero. I don't know how to write script, but I figure with the combination of Oilcan and if someone could write a script to edit out the subject line in the email link, that would "temporary" take care of the problem.

  5. #5
    Join Date
    Nov 2008
    Location
    Queens, NY
    Posts
    150

    Default Re: Craigslist G1 email problem Need a possible script maybe to fix problem with Oilc

    I had something working but it turns out that I can't user XPath query engine. Need another alternative. I'll report back once I get something working.
    JayBachatero
    G1 - JF 1.5 Build; Apps to SD

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.


    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.



    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Originally Posted by ickyfehmleh
    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Are you the kind of person that doesn't donate anything (code, money, time, hardware, bandwidth) back to the community? A technology welfare recipient?

  6. #6
    Join Date
    Nov 2008
    Location
    Queens, NY
    Posts
    150

    Default Re: Craigslist G1 email problem Need a possible script maybe to fix problem with Oilc

    Here you go. Oilcan is kinda quirky still but it still works. Hopefully this will tie into the default browser soon.

    Code:
    // ==UserScript==
    // @name           Android "mailto" Fix by JayBachatero
    // @namespace      http://www.jaybachatero.com
    // @description    Removes the subject part of the mailto link to bypass a bug in Android.
    // @version        1.0
    // @include        http://*
    // ==/UserScript==
    
    init();
    
    function init()
    {
    	var mailtos = document.getElementsByTagName('a');
    
    	for (var i = 0; i < mailtos.length; i++)
    	{
    		var href = mailtos[i].href.replace(/&#(\d+);/g, String.fromCharCode('$1')).replace(/mailto:([0-9A-Za-z=_+\-\/][0-9A-Za-z=_'+\-\/\.]*@[\w\-]+(?:\.[\w\-]+)*(?:\.[\w]{2,6}))(\?subject\=.*?)$/, '$1');
    		mailtos[i].addEventListener('click', function(event) {
    			window.intentHelper.startActivity(JSON.stringify({
    				action: 'ACTION_SEND',
    				type: 'plain/html',
    				'EXTRA_TO': href,
    				'EXTRA_SUBJECT': ' ',
    				'EXTRA_TEXT': ' '
    			}));
    		}, false);
    		mailtos[i].href = 'javascript: ;'
    	}
    }
    Should be saved as fix_mailto.user.js and saved to the sd card.
    Last edited by JayBachatero; 12-21-2008 at 07:51 PM. Reason: Error.
    JayBachatero
    G1 - JF 1.5 Build; Apps to SD

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.


    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.



    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Originally Posted by ickyfehmleh
    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Are you the kind of person that doesn't donate anything (code, money, time, hardware, bandwidth) back to the community? A technology welfare recipient?

  7. #7
    Join Date
    Nov 2008
    Location
    Queens, NY
    Posts
    150

    Default Re: Craigslist G1 email problem Need a possible script maybe to fix problem with Oilc

    Ok after I had it working I managed to break it again so I'll report back with a working version in a few.
    JayBachatero
    G1 - JF 1.5 Build; Apps to SD

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.


    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.



    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Originally Posted by ickyfehmleh
    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Are you the kind of person that doesn't donate anything (code, money, time, hardware, bandwidth) back to the community? A technology welfare recipient?

  8. #8
    Join Date
    Dec 2008
    Posts
    5

    Default Re: Craigslist G1 email problem Need a possible script maybe to fix problem with Oilc

    Well thanks in advance. I also posted something on the userscripts.org for possibly there. It I find anything out I'll post it.

  9. #9
    Join Date
    Nov 2008
    Location
    Queens, NY
    Posts
    150

    Default Re: Craigslist G1 email problem Need a possible script maybe to fix problem with Oilc

    I haven't been able to get it to work. It might be something with the implementation of oilcan. I'm going to email the developer and see if he can point me in the right direction.

    This is the code that is supposed to work.
    Code:
    // ==UserScript==
    // @name           Android "mailto" Fix by JayBachatero
    // @namespace      http://www.jaybachatero.com
    // @description    Removes the subject part of the mailto link to bypass a bug in Android.
    // @version        1.0
    // @include        http://*
    // ==/UserScript==
    
    init();
    
    function init()
    {
    	var mailtos = document.getElementsByTagName('a');
    
    	for (var i = 0; i < mailtos.length; i++)
    	{
    		if (mailtos[i].toString().match(/mailto:/))
    		{
    			mailtos[i].addEventListener('click', function(event) {
    				var mailto = event.target;
    
    				var matches = mailto.toString().replace(/&#(\d+);/g, String.fromCharCode('$1')).match(/mailto:([0-9A-Za-z=_+\-\/][0-9A-Za-z=_'+\-\/\.]*@[\w\-]+(?:\.[\w\-]+)*(?:\.[\w]{2,6}))(?:\?subject\=(.*?))?$/);
    				var to = matches[1];
    				var subject = matches[2] != 'undefined' ? matches[2] : ' ';
    
    				window.intentHelper.startActivity(JSON.stringify({
    					action: 'ACTION_SEND',
    					'EXTRA_EMAIL': to.toString(),
    					'EXTRA_SUBJECT': subject ? subject.replace(/%20/g, ' ') : '',
    					'EXTRA_TEXT': '',
    					type: 'message/rfc822'
    				}));
    				mailto.href = 'javascript: ;';
    			}, false);
    		}
    	}
    }
    JayBachatero
    G1 - JF 1.5 Build; Apps to SD

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.


    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.



    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Originally Posted by ickyfehmleh
    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
    Are you the kind of person that doesn't donate anything (code, money, time, hardware, bandwidth) back to the community? A technology welfare recipient?

  10. #10
    Join Date
    Nov 2008
    Posts
    325

    Default Re: Craigslist G1 email problem Need a possible script maybe to fix problem with Oilc


    Why not apply it just to craigslist.org rather than every non-SSL site?

    Did you try renaming the script and then loading it back into OilCan? OilCan has a caching problem that sticks around even when you uninstall and then reinstall it.

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. problem setting up email.
    By yozpalang in forum HTC
    Replies: 14
    Last Post: 12-27-2009, 05:52 PM
  2. Ok, please help! What's the issue with email links and CraigsList?
    By visualoddity in forum General Android Chat
    Replies: 5
    Last Post: 12-21-2008, 09:47 PM
  3. Email problem please help
    By JonFolse in forum HTC
    Replies: 4
    Last Post: 11-06-2008, 12:11 PM
  4. SMS Problem
    By Faaip05 in forum HTC
    Replies: 7
    Last Post: 11-04-2008, 10:32 AM
  5. Just found a problem / non-problem
    By sprintrjm in forum HTC
    Replies: 1
    Last Post: 10-23-2008, 09:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts