MCPcopy Create free account
hub / github.com/hoothin/UserScripts / forceTrailingSlash

Function forceTrailingSlash

Picviewer CE+/Picviewer CE+.user.js:1720–1726  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

1718 * @return {String} the path with a trailing slash.
1719 */
1720var forceTrailingSlash = function(path) {
1721 // Check the name ends with a /
1722 if (path.slice(-1) !== "/") {
1723 path += "/"; // IE doesn't like substr(-1)
1724 }
1725 return path;
1726};
1727
1728/**
1729 * Add a (sub) folder in the current folder.

Callers 2

fileAddFunction · 0.70
folderAddFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected