panjareh
Version:
Panjareh using aparat and phoenix-video-player to play videos on desktops and tvs.
18 lines (15 loc) • 427 B
JavaScript
import { getParam } from "../utils";
function getAlias(pathname) {
if (typeof pathname === "undefined") return null;
const pathnames = pathname.split("/");
return pathnames[pathnames.length - 1];
}
function getPreInitData() {
const { pathname, search } = window.location;
const data = {
alias: getAlias(pathname),
return_url: getParam("return_url", search),
};
return data;
}
export { getPreInitData };