[Pkg-mozext-commits] [automatic-save-folder] 61/133: Fix :
David Prévot
taffit at moszumanska.debian.org
Mon Apr 27 20:33:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch wip
in repository automatic-save-folder.
commit d1bfbe62d6bc1b6ef1755716290404eacc5f4449
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date: Sat Feb 6 15:47:16 2010 +0000
Fix :
Date.prototype is not allowed and got rejected by Mozilla submission process.
Corrected the files and submitted again.
git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@62 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
content/asf_download.js | 5 +++--
content/asf_right_click.js | 9 ++++++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/content/asf_download.js b/content/asf_download.js
index 393bf4b..30bdf83 100644
--- a/content/asf_download.js
+++ b/content/asf_download.js
@@ -335,14 +335,15 @@ Copyright (C) 2007-2010 Éric Cassar (Cyan).
if (!path) return false;
if (this.trim(path).length==0) return false;
- Date.prototype.getWeek = function() // Add the getWeek() function do date()
+ var Date_asf = Date;
+ Date_asf.prototype.getWeek = function() // Add the getWeek() function do date()
{
var onejan = new Date(this.getFullYear(),0,1);
var week = Math.ceil((((this - onejan) / 86400000) + onejan.getDay()-1)/7);
if (onejan.getDay() > 4) week--; // if the first week does not contain a thrusday, it's not the first week (and return as week 0)
return week;
}
- var objdate = new Date();
+ var objdate = new Date_asf();
// make the array with the month's name in the stringbundle of the locale language path.
diff --git a/content/asf_right_click.js b/content/asf_right_click.js
index 8b1bf2b..bca8d7c 100644
--- a/content/asf_right_click.js
+++ b/content/asf_right_click.js
@@ -354,12 +354,15 @@ var automatic_save_folder = {
if (!path) return false;
if (this.trim(path).length==0) return false;
- Date.prototype.getWeek = function() // Add the getWeek() function do date()
+ var Date_asf = Date;
+ Date_asf.prototype.getWeek = function() // Add the getWeek() function do date()
{
var onejan = new Date(this.getFullYear(),0,1);
- return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()+1)/7);
+ var week = Math.ceil((((this - onejan) / 86400000) + onejan.getDay()-1)/7);
+ if (onejan.getDay() > 4) week--; // if the first week does not contain a thrusday, it's not the first week (and return as week 0)
+ return week;
}
- var objdate = new Date();
+ var objdate = new Date_asf();
// make the array with the month's name in the stringbundle of the locale language path.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/automatic-save-folder.git
More information about the Pkg-mozext-commits
mailing list