Recent posts by bananaphone
|
May 22, 2007
|
Topic: Script development / Add line after a specific <div> Ok finally done!!
Thank you so much for helping me out! |
|
May 22, 2007
|
Topic: Script development / Add line after a specific <div> That first function didn't work.. or I don't get how to use it... Say if
<div class="modelinkOn"> <nobr id="mode-month"> Month </nobr> </div>changes to <div class="modelinkOff"> <nobr id="mode-month"> Month </nobr> </div>Can you dectect it and run a function then? But isn't there any way to listen for clicks thats comes from specific class? That would be the easiest way for me, because now all clicks activates my function and it craps up. So I only want to run my function when you click on this specific link:
<td class="noprint"> <img class="navbutton" src="images/btn_next.gif" style="vertical-align: middle; padding-left: 2px; padding-right: 2px;" onmousedown="fd(1);return false;" height="17" width="29"> </td> Is it possible? sigh.. I have been fiddling with this script for 6 hours straight and nothing works... |
|
May 22, 2007
|
Topic: Script development / Add line after a specific <div> Now almost everything is working.. Just one thing left to do. I need to get the script to stay on place in google calendar.
function showWeeklings() {
the script...
}
window.addEventListener('load',showWeeklings,false);
window.addEventListener('click',showWeeklings,false);
It stays when I reload the page (hit f5) but it doesn't stay on the initial load (when u first go to the page). Also is there any way do so the click listener only can run one time? Or even better if the click listner only listens to a click event from a specific class like this one: <td class="noprint"> <button disabled="disabled" onclick="fd(0);return false;" id="todayButton" style="padding: 0px 1px; font-size: 85%; vertical-align: middle;"> Today </button> </td> |
|
May 22, 2007
|
Topic: Script development / How to get started Also this page is very useful for xpath expressions:
|
|
May 22, 2007
|
Topic: Script development / Add line after a specific <div> Thanks Arvid for the solution and for the coding tip, Descriptor. Regular expressions is nothing new to as I have experienced it with php coding. The big problem is this.Object.Oriented.Programming style with methods and how all objects are related to each other. |
|
May 21, 2007
|
Topic: Script development / Add line after a specific <div> Ok thanks for that guys!
<span onmousedown="sA('20070501)">may 2007</span> I was thinking of using this xpath:
var displayDate = document.evaluate("//span[contains(@onmousedown, 'sA')]",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
if (!displayDate.snapshotLength) return;
showdate = displayDate.snapshotItem(0).textContent;
alert (showdate);
But it displays the value IN the node (may 2007) but I want to fetch the value of the onmousedown attribute itself. Is that possible with xpath? |
|
May 21, 2007
|
Topic: Script development / How to get started Much of the information in Dive into Greasemonkey is outdated. |
|
May 21, 2007
|
Topic: Script development / Add line after a specific <div> Thank you for helping.. now I want to go on.. but the greasemonkey tutorials are very sparse and/or outdated, and the wiki don't give much for a newcomer.
classes I mentioned also contain a xy value and I would like to fetch that value for each div. (Before adding the date span.)
Like this: MyValue So I want to store MyValue in a variable. Can you do that with Xpath to? Thats is the last thing a need help with I think :) |
|
May 20, 2007
|
Topic: Script development / Add line after a specific <div> Im new to greasemonkey and userscripts but I starting to learn stuff. Now I need help with a basic thing I want to do.
:
The id attribute is specific on each. Like this: id="rg_rowy_hN" which changes from 0-4 like this: And I want my line after each of them..
I hope it's not more complicated than I think. |
|
Apr 15, 2007
|
Topic: Ideas and script requests / Show (ISO) week number in google calendar The week number is the current number of the week counted from the beginning of the year. The system is used (mainly) in government and business for fiscal years, as well as in timekeeping. In guess it is not widely used (or at all) in the US but its quite common in Scandinavia and other parts of Europe.
I would like to see this numbering in Google calendar, but since my javascript isn't very well I ask for your help. After some googleing I found a decent function that calculates current week number so the task would be to attach the number to the calendar.
|
|
Mar 18, 2007
|
Topic: Ideas and script requests / Prevent links in upper panel in gmail to open i new window Yes, I just tried to reinstall the script and greasemonkey and other extensions. Nothing changed.
So enabling Gmail view: "standard without chat" will break this script. |
|
Mar 18, 2007
|
Topic: Ideas and script requests / Prevent links in upper panel in gmail to open i new window URL:
|
|
Mar 18, 2007
|
Topic: Ideas and script requests / Prevent links in upper panel in gmail to open i new window Thank you, but it still doesn't work. Maybe someelse could verify? I am running latest version of firefox and greasemonkey. |
|
Mar 16, 2007
|
Topic: Ideas and script requests / Prevent links in upper panel in gmail to open i new window No, it doesn't touch the targets attributes at all.
However it works fine at the calendar page. (calender->gmail links etc).. That is weird. |
|
Mar 16, 2007
|
Topic: Ideas and script requests / Prevent links in upper panel in gmail to open i new window Thank you, but it doesn't seem to work. |
|
Mar 15, 2007
|
Topic: Ideas and script requests / Prevent links in upper panel in gmail to open i new window I would like to force the links in the upper blue link panel (image below) to open i the same window. This is to prevent opening multiple windows when switch back and forward to different google services.
|
