r/programming • • Jun 09 '16

jQuery 3.0 Released!

https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/
1.1k Upvotes

354 comments sorted by

View all comments

Show parent comments

40

u/El_Impresionante Jun 10 '16

Guys, I wrote this function to jQuery to do just that. How do I get the jQuery devs to include it in the main library?

function $_add(n1, n2) {
    result = null;
	$.ajax({
		url : "https://www.google.com/search?q=" + n1.toString() + "%2B" + n2.toString(),
        context: document.body
	})
    .done(function() {
        result = parseInt($(this).find("#cwcot").text());
    });
    return result;
}

5

u/kirbyfan64sos Jun 10 '16

+1 Did not see this coming. At all.

5

u/tasty_cupcakes Jun 10 '16

Can you create a npm package for it? Thx, it's the last thing i need to finish my webscale pacemaker.