-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtabconfig.html
More file actions
44 lines (40 loc) · 1.57 KB
/
tabconfig.html
File metadata and controls
44 lines (40 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -->
<!-- See LICENSE in the project root for license information -->
<!DOCTYPE html>
<html>
<body>
<form>
<input type="radio" name="sitetype" value="Wortell" onclick="onClick()"> Wortell
<br>
<input type="radio" name="sitetype" value="Blog" onclick="onClick()"> Blog
</form>
<script src="https://statics.teams.microsoft.com/sdk/v0.4/js/MicrosoftTeams.min.js"></script>
<script type="text/javascript">
microsoftTeams.initialize();
microsoftTeams.settings.registerOnSaveHandler(function(saveEvent) {
var radios = document.getElementsByName('sitetype');
if (radios[0].checked) {
microsoftTeams.settings.setSettings({
entityID: "Wortell",
contentUrl: "https://rawgit.com/KbWorks/TeamsTab/master/embed.html",
suggestedTabName: "Wortell",
websiteUrl: "http://www.wortell.nl",
removeUrl: window.location.origin + "/tabremove.html"
});
} else {
microsoftTeams.settings.setSettings({
entityID: "Blog",
contentUrl: "https://rawgit.com/KbWorks/TeamsTab/master/embed.html",
suggestedTabName: "Blog",
websiteUrl: "https://sharepoint-specialist.nu",
removeUrl: window.location.origin + "/tabremove.html"
});
}
saveEvent.notifySuccess();
});
function onClick() {
microsoftTeams.settings.setValidityState(true);
}
</script>
</body>
</html>