Advanced search  

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

Pages: [1]   Go Down

Author Topic: Greasemonkey Coppermine support script  (Read 5904 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.015 seconds with 17 queries.