Greasemonkey Coppermine support script Greasemonkey Coppermine support script
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Greasemonkey Coppermine support script

Started by Nibbler, May 18, 2005, 03:47:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nibbler

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.


// ==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.