The One with the Thoughts of Frans

Archive for July, 2006

Aanschouw de jaren 1900-1950

While browsing through my father’s book collection, I found a fairly awesome picture book entitled Observe the years 1900-1950: a book full of pictures illustrating and describing events of the then past 50 years, published in late 1949.

I scanned some of the images I liked best.

  1. “In foreign countries, traditions completely unknown in The Netherlands persisted. In France there was a duel between two members of the chamber in 1902, while in German fraternities ‘Mensur’ still existed, where the goal was to hurt each other so he’d bleed, preferably in the face.”

  2. “The airforce was a new weapon, which enabled previously unthought of possibilities for bombing of important targets.”

  3. “Science continued, despite the international uproar. In 1915 Shackleton researched the South-pole area, while his ship, the ‘endurance’ was cracked by ice. The discovery of the grave of Tut-ankh-amon in 1926 was remarkable.”

  4. “On the side of the government [of Spain] women actively participated in battle, while numerous volunteers joined forces both for and against the republican government.”

  5. “Of the heart of the prosperous harbor-city of Rotterdam, only wasteland remains.”

  6. “Like master… like servant. In Europe the Führer makes himself popular, so the Leider [Dutch for leader, German puppet government] faithfully follows his example.”
  7. “Death by famine and exhaustion is the fate of many. But the worst will only appear later
  8. “The price of freedom. The American war-churchyard Margraten in Limburg.”
  9. “The creation of the state of Israel on 15 May 1948 brought happiness to the Jewish people who finally found a mother country after all those centuries of wandering. On the first meeting of the world council of chuches, 4 September 1948 in Amsterdam, it was created as permanent contact-point for all Christians. The Catholic Church and the Orthodox Russian church were not present.”

  10. “Because of the advancing communist troops in China, the waterways in Shanghai had to harbour uncountable amounts of sampans. In The Netherlands all attention was concentrated on the developments in Indonesia, which led to the round-table conference.”

  11. “At the beginning of the century Europe dominated the world. Now the power swifted to the hands of the United States of America and the Soviet Union. Will their decisions decide the future of our continent?”

CommentsTags:

Opera User JS and GreaseMonkey interoperability

I’ve written a User JS with enhancements for AvidGamers. However, GreaseMonkey automatically wraps the entire script in an anonymous function. To create functions in your User JS, which are accessible in the page itself (by elements you inserted), you need to attach it to the window object.

All of that would be great, but it didn’t work. Digging through the GreaseMonkey website I eventually discovered that this had to do with some kind of security bug (the link to Mark Pilgrims guide as the way to learn about GreaseMonkey didn’t help much).

To make a long story short, I used the following to create Opera User JS and Greasemonkey interoperability.

// for GreaseMonkey compatibility
if (typeof unsafeWindow != 'undefined') window = unsafeWindow;

// how to add variables
window['some_variable'] = 'Some text';

// how to add functions
window.some_function = function (var1, var2) {
	// do something
}

To keep your code clean it’s a good idea to add in some extra variables for reference inside your code.

var some_variable = window[some_variable];

Regardless of security issues which removed direct access to the window object, it seems a tad weird to me to always wrap the code in an anonymous function. Should that not be up to me, the script author, to decide? Opera’s implementation appears to be just perfect…

Comments (1)