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

Function capitalize

Picviewer CE+/dist.user.js:16609–16615  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

16607 var maximizeContainer = this.eleMaps['maximize-container'];
16608 var sidebarPosition = prefs.gallery.sidebarPosition,
16609 capitalize = function(string) { // 将字符串中每个单词首字母大写
16610 var words = string.split(" ");
16611 for (var i = 0; i < words.length; i++) {
16612 words[i] = words[i].charAt(0).toUpperCase() + words[i].slice(1);
16613 }
16614 return words.join(" ");
16615 };
16616 maximizeContainer.style.minHeight = 0;
16617 maximizeContainer.parentNode.style.display = "none";
16618 if(this.hideBodyStyle.parentNode)

Callers 1

initFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected