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

Function isAudioLink

Picviewer CE+/Picviewer CE+.user.js:25887–25895  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

25885 }
25886
25887 function isAudioLink(url) {
25888 if (url.indexOf('.audio') !== -1 || url.indexOf('audio:') === 0)
25889 return true;
25890 url = url.replace(/\/$/, "");
25891 if (url.lastIndexOf('?') > 0)
25892 url = url.substring(0, url.lastIndexOf('?'));
25893 const ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
25894 return audioExtensions.has(ext);
25895 }
25896
25897 MatchedRuleC.prototype={
25898 init:function(){

Callers 1

initFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected