Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Greasemonkey Coppermine support script  (Read 5901 times)

0 Members and 1 Guest are viewing this topic.

Nibbler

  • Guest
Greasemonkey Coppermine support script
« on: May 18, 2005, 03:47:21 pm »

This is a user script for the greasemonkey firefox extension. It adds the cpg version number and links to reset the theme+lang into the standard coppermine footer to save messing around with the source and adding things into the address bar.

Code: [Select]
// ==UserScript==
// @name          Coppermine Support script
// @description   Provides the version number of the Coppermine Gallery you are viewing, plus some misc support/debug tools.
// ==/UserScript==

(function() {
window.addEventListener("load", function(e) {
version = document.body.innerHTML.match(/<\!--Coppermine Photo Gallery (.*)-->/);

if (version){
divs = document.getElementsByTagName("div");
for (var i = divs.length-1 ; i >= 0; i--){
if (divs[i].className == 'footer') {
divs[i].innerHTML +=
'<p>Version: ' + version[1] + '</p>'
+ '<p>Theme & language: <a href="index.php?lang=xxx&theme=xxx">[Defaults]</a>'
+ '<a href="index.php?lang=english&theme=classic">[English + Classic]</a>';
return true;
}
}
}
  }, true);
})();

Suggestions welcome for further use of greasemonkey with coppermine.
Logged
Pages: [1]   Go Up
 

Page created in 0.013 seconds with 18 queries.