From earlier SO post i found that for Greasemonkey script to be compatible with Chrome we have to create script element for jQuery http://erikvold.com/blog/index.cfm/2010/6/14/using-jquery-with-a-user-script
If my current userscript which works fine in firefox is as follows. How should I modify it to include the above method and still call the function on onload? Where do I place the current code in the solution suggested in earlier posts?
// ==UserScript==
// @name Google+
// @version 1.1
//
//
// @include http://plus.google.com/*
// @include https://plus.google.com/*
//
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
$(function()
{
$(window).bind('load', function()
{
console.log("Hi Condition is very bad!")
$('<div id="vdiv"></div>').prependTo('#contentPane');
$('<img>',
{
src: 'http://icons.iconarchive.com/icons/aha-soft/security/16/key-icon.png',
alt: 'Key',
title:'Key',
click: function(){
alert($(this).attr('title'));
var vtext = jQuery('div.f-ba-mg iframe').contents().find('body').text().trim();
alert(vtext);
}
})
.css({
cursor: 'pointer',
border: '1px solid black',
backgroundColor: 'white'
})
.appendTo('#vdiv');
});
});