Developers
Add T’ OnSong
Ahoy! Th’ Add To OnSong extension enables users t’ add music content from yer website by tappin’ into share an’ action extensions in iOS. OnSong may also support importin’ o’ content through an in-app browser. As a website owner, ye can control what be imported an’ whether ye want content t’ be importable, Arrr!
How It Works
T’ determine what content t’ import, OnSong reviews th’ content o’ th’ website t’ find applicable treasure:
- Review
<input type="hidden"/>elements t’ locate one that contains valid ChordPro syntax. - If not found, enumerates
preelements an’ uses th’ element wi’ th’ longest content. - Found content be always stripped o’ HTML tags t’ remove additional formattin’.
- Finds th’ last
h1tag that contains only text an’ uses that as th’ filename. - If not found, th’ filename be extracted from th’ last component o’ th’ URL.
If content has been located, it be saved t’ a file wi’ th’ found name an’ imported in th’ native file format. If needed, th’ title o’ th’ song be appended t’ th’ content if missin’.
Makin’ Yer Content Better
If ye want users t’ receive th’ best possible content when importin’ usin’ th’ Add To OnSong Safari extension, use th’ followin’ tips:
- Add or alter an
<input type="hidden"/>element containin’ ChordPro content.
OnSong will always use this instead o’pretags. - Make sure that th’ content found in pre tags be in th’ OnSong or ChordPro file formats.
- Ensure that ye have set appropriate restrictions on th’ file usin’ th’ restrictions metadata tag, ye scallywag.
Preventin’ Content From Bein’ Added
If ye don’t wish t’ have yer content accessed by OnSong, try th’ followin’:
- Provide an
<input type="hidden"/>element that contains ChordPro wi’ only a title, matey. - Do not include
<input type="hidden"/>elements containin’ ChordPro orpretags. - Use Javascript t’ render chord charts an’ prevent ’em from bein’ publicly indexed or plundered by software, savvy?