This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// POST request Call | |
function RestRequest(url, params) { | |
var req = new XMLHttpRequest(); | |
return new Promise(function(resolve, reject) { | |
req.onreadystatechange = function() { | |
if (req.readyState != 4) // Loaded | |
return; | |
if (req.status >= 200 && req.status < 300) { | |
resolve(req); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"d": { | |
"__metadata": { | |
"id": "https://<tenant>.sharepoint.com/sites/ktskumar/_api/FontPackages/GetById('ea101761-bc64-4f8e-96f5-163c605a6041')", | |
"uri": "https://<tenant>.sharepoint.com/sites/ktskumar/_api/FontPackages/GetById('ea101761-bc64-4f8e-96f5-163c605a6041')", | |
"type": "SP.FontPackage" | |
}, | |
"ID": "ea101761-bc64-4f8e-96f5-163c605a6041", | |
"IsHidden": false, | |
"IsValid": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"d": { | |
"Apply": null | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"d": { | |
"results": [ | |
{ | |
"__metadata": { | |
"id": "https://<tenant>.sharepoint.com/sites/ktskumar/_api/SP.FontPackagefff39b0b-8476-4564-a678-9daac8ef29ba", | |
"uri": "https://<tenant>.sharepoint.com/sites/ktskumar/_api/SP.FontPackagefff39b0b-8476-4564-a678-9daac8ef29ba", | |
"type": "SP.FontPackage" | |
}, | |
"ID": "ea101761-bc64-4f8e-96f5-163c605a6041", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"d": { | |
"results": [ | |
{ | |
"__metadata": { | |
"id": "https://<tenant>.sharepoint.com/sites/ktskumar/_api/SP.FontPackage1708d258-0e7b-40ad-831d-53e374293ee1", | |
"uri": "https://<tenant>.sharepoint.com/sites/ktskumar/_api/SP.FontPackage1708d258-0e7b-40ad-831d-53e374293ee1", | |
"type": "SP.FontPackage" | |
}, | |
"ID": "1e7a7803-045d-44df-9c7a-d2f2f8562e51", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Below code uses the PnP JS and helps to copy the webpart from one page to another page in modern SharePoint page | |
*/ | |
import { sp } from "@pnp/sp/presets/all"; | |
(async () => { | |
const page = await sp.web.loadClientsidePage("/sites/portal/SitePages/page2.aspx"); | |
const control = page.sections[1].columns[0].getControl(0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Speaker Authenticator</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/recorderjs/0.1.0/recorder.js"></script> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>Validate Speaker</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mgt-get resource="/groups" version="v1.0" scopes="group.read" max-pages="2"> | |
<template> | |
<div class="get-wrapper"> | |
<div class="table"> | |
<div class="row header"> | |
<div class="cell"> | |
Name | |
</div> | |
<div class="cell"> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mgt-get resource="/me/drive" version="v1.0" scopes="file.read" max-pages="2"> | |
<template> | |
<div class="objcontainer" data-for="{{a in Object.keys(this)}}"> | |
<div class="key">{{a}}</div> | |
<div data-if="{{typeof(this[a]) != 'object'}}" class="value">{{this[a]}} </div> | |
<div data-else class="value"> | |
<div data-for="{{b in Object.keys(this[a])}}"> | |
<div class="key">{{b}}</div> | |
<div class="value">{{this[a][b]}}</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mgt-person person-query="me"> | |
<template> | |
<div id="outerContainer" data-if="person.personImage"> | |
<div id="container"> | |
<div class="item"> | |
<img src="{{ person.personImage }}" /> | |
</div> | |
<div class="circle" style="animation-delay: -3s"> | |
</div> | |
<div class="circle" style="animation-delay: -2s"> |
NewerOlder