Widget:ICSGenerator: Difference between revisions
Jump to navigation
Jump to search
m Moved the currentScript declaration outside |
m Using IIFE to scope the container variable |
||
| Line 2: | Line 2: | ||
var icsStart = "<!--{$start|escape:'html'}-->"; | var icsStart = "<!--{$start|escape:'html'}-->"; | ||
var icsEnd = "<!--{$end|escape:'html'}-->"; | var icsEnd = "<!--{$end|escape:'html'}-->"; | ||
var container = document.currentScript.parentNode; | (() => { | ||
RLQ.push(['ext.gadget.md5hasher', function () { | var container = document.currentScript.parentNode; | ||
RLQ.push(['ext.gadget.md5hasher', function () { | |||
$(document).ready(function() { | |||
}); | window.iopwidgets.ICSGenerator.buildIcsLink(icsName, icsStart, icsEnd, container); | ||
} | }); | ||
}]); | |||
})(); | |||
</script></includeonly><noinclude>{{Documentation}}</noinclude> | |||
Latest revision as of 19:37, 18 July 2025
Creates a download link for an ICS file (event date container).
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Title of the event | title | The general title of the event. This is the text that will be shown in a calendar. Keep it short.
| String | required |
| Event start | start | The start date of the event.
| Date | required |
| Event end | end | The ending of the event.
| Date | required |
Usage
See the widget's testcases:
| Test with given full date definition | |
|---|---|
| Wiki code | {{#widget:ICSGenerator
|title=Name of the event
|start=20220218T194956
|end=20220218T195956}}
|
| Main version | |
| Sandbox version | (no sandbox subpage) |
| Test with short date definition | |
|---|---|
| Wiki code | {{#widget:ICSGenerator
|title=Name of the event
|start=20220218T194956
|end=20220218T195956}}
|
| Main version | |
| Sandbox version | (no sandbox subpage) |
See also
| The above documentation is transcluded from Widget:ICSGenerator/doc. (edit | history) |
