mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 00:02:27 +01:00
prefer let over var in vimperator#config
This commit is contained in:
@@ -220,7 +220,7 @@ const config = { //{{{
|
|||||||
"Open homepage in a new tab",
|
"Open homepage in a new tab",
|
||||||
function ()
|
function ()
|
||||||
{
|
{
|
||||||
var homepages = gHomeButton.getHomePage();
|
let homepages = gHomeButton.getHomePage();
|
||||||
liberator.open(homepages, /\bhomepage\b/.test(options["activate"]) ?
|
liberator.open(homepages, /\bhomepage\b/.test(options["activate"]) ?
|
||||||
liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB);
|
liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB);
|
||||||
});
|
});
|
||||||
@@ -247,7 +247,7 @@ const config = { //{{{
|
|||||||
count = 1;
|
count = 1;
|
||||||
|
|
||||||
// XXX
|
// XXX
|
||||||
var url = buffer.URL;
|
let url = buffer.URL;
|
||||||
for (let i = 0; i < count; i++)
|
for (let i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
if (isDirectory(url))
|
if (isDirectory(url))
|
||||||
@@ -268,7 +268,7 @@ const config = { //{{{
|
|||||||
"Go to the root of the website",
|
"Go to the root of the website",
|
||||||
function ()
|
function ()
|
||||||
{
|
{
|
||||||
var uri = content.document.location;
|
let uri = content.document.location;
|
||||||
if (/(about|mailto):/.test(uri.protocol)) // exclude these special protocols for now
|
if (/(about|mailto):/.test(uri.protocol)) // exclude these special protocols for now
|
||||||
{
|
{
|
||||||
liberator.beep();
|
liberator.beep();
|
||||||
@@ -318,7 +318,7 @@ const config = { //{{{
|
|||||||
"Redraw the screen",
|
"Redraw the screen",
|
||||||
function ()
|
function ()
|
||||||
{
|
{
|
||||||
var wu = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
let wu = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
||||||
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||||
wu.redraw();
|
wu.redraw();
|
||||||
modes.show();
|
modes.show();
|
||||||
@@ -398,7 +398,7 @@ const config = { //{{{
|
|||||||
{
|
{
|
||||||
setter: function (value)
|
setter: function (value)
|
||||||
{
|
{
|
||||||
var ioService = Components.classes['@mozilla.org/network/io-service;1']
|
const ioService = Components.classes['@mozilla.org/network/io-service;1']
|
||||||
.getService(Components.interfaces.nsIIOService2);
|
.getService(Components.interfaces.nsIIOService2);
|
||||||
|
|
||||||
ioService.offline = !value;
|
ioService.offline = !value;
|
||||||
@@ -421,7 +421,7 @@ const config = { //{{{
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var id = config.mainWindowID || "main-window";
|
let id = config.mainWindowID || "main-window";
|
||||||
document.getElementById(id).setAttribute("titlemodifier", value);
|
document.getElementById(id).setAttribute("titlemodifier", value);
|
||||||
if (window.content.document.title.length > 0)
|
if (window.content.document.title.length > 0)
|
||||||
document.title = window.content.document.title + " - " + value;
|
document.title = window.content.document.title + " - " + value;
|
||||||
|
|||||||
Reference in New Issue
Block a user