1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 10:08:00 +01:00

ctrl-x/a doesn'

This commit is contained in:
Martin Stubenschrott
2008-06-17 01:57:23 +00:00
parent 9a64fd935b
commit 2b3a93dcbd

View File

@@ -97,14 +97,11 @@ liberator.config = { //{{{
function incrementURL(count) function incrementURL(count)
{ {
var url = liberator.buffer.URL; var url = liberator.buffer.URL;
var regex = /(.*?)(-?\d+)(\D*)$/; var regex = /(.*?)(\d+)(\D*)$/;
var matches = url.match(regex); var matches = url.match(regex);
if (!matches || !matches[2]) // no number to increment if (!matches || !matches[2]) // no number to increment
{ return liberator.beep();
liberator.beep();
return;
}
var newNum = parseInt(matches[2], 10) + count + ""; // "" to make sure its a string var newNum = parseInt(matches[2], 10) + count + ""; // "" to make sure its a string
var nums = newNum.match(/^(-?)(\d+)$/); var nums = newNum.match(/^(-?)(\d+)$/);