This file contains 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
package com. .api.service; | |
import com. .api.domain.user.UserInfo; | |
import com. .api.service.message.MessageService; | |
import java.util.Date; | |
import java.util.Iterator; | |
import java.util.Map; | |
import java.util.concurrent.ConcurrentHashMap; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; |
This file contains 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
module.exports = { | |
context: 'src', | |
entry: { | |
popup: 'popup/popup.tsx', | |
"background-redirecter": 'background/redirecter/redirecter.ts', | |
"tab-redirect": 'tabs/redirect/redirect.tsx', | |
"content-redirect": 'content/redirect/redirect.ts', | |
"content-hangouts": 'content/hangouts/hangouts.ts', | |
}, |
This file contains 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
import { Card, CardHeader } from '@material-ui/core'; | |
import React, { FunctionComponent } from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { HashRouter, Route, Switch } from 'react-router-dom'; | |
import { Holding } from './components/Holding'; | |
import { Record } from './components/Record'; | |
import { Signup } from './components/Signup'; | |
import './popup.scss'; |
This file contains 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
<html> | |
<head> | |
<meta | |
name="viewport" | |
content="width=device-width, initial-scale=1, shrink-to-fit=no" | |
/> | |
<link rel="stylesheet" href="popup.bundle.css" /> | |
</head> | |
<body> |
This file contains 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
{ | |
"x-amazon-apigateway-integration": { | |
"uri": "https://slack.com/api/oauth.access", | |
"responses": { | |
"default": { | |
"statusCode": "200", | |
"responseTemplates": { | |
"application/json": "<b>Please wait</b>\n<div style=\"display:none\">\n <div id=\"json\">$input.json('$')</div>\n</div>\n" | |
} | |
} |
This file contains 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
import Button from '@material-ui/core/Button'; | |
import CardActions from '@material-ui/core/CardActions'; | |
import React, { FunctionComponent } from 'react'; | |
import uuid from 'uuid/v4'; | |
const sendRequest = e => { | |
let clientId = '655447184916.649599483553' | |
let scope = 'incoming-webhook,chat:write:bot,commands,users:read,team:read,bot' | |
let state = uuid() | |
let url = `https://slack.com/oauth/authorize?client_id=${clientId}&scope=${scope}&state=${state}` |
This file contains 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
{ | |
"content_scripts": [ | |
{ | |
"matches": [ | |
"https://abc123example.execute-api.eu-west-2.amazonaws.com/v1/redirect*" | |
], | |
"js": [ | |
"content-redirect.bundle.js" | |
] | |
} |
This file contains 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
let data = {} | |
try { | |
let json = document.getElementById('json').textContent | |
data = JSON.parse(json) | |
} catch (error) { | |
data = { | |
ok: false, | |
error: error.message | |
} | |
} |
This file contains 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
import { CircularProgress } from '@material-ui/core'; | |
import CardContent from '@material-ui/core/CardContent'; | |
import React, { FunctionComponent, useEffect, useState } from 'react'; | |
import { Redirect, RouteComponentProps } from 'react-router-dom'; | |
const getStorage = () => new Promise(resolve => chrome.storage.local.get(resolve)); | |
type Props = RouteComponentProps; | |
const Holding: FunctionComponent<Props> = (props: Props) => { | |
const [redirect, setRedirect] = useState(''); |
This file contains 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
import URLParse from 'url-parse' | |
chrome.webRequest.onHeadersReceived.addListener ( | |
details => { | |
let slackResponse = details.responseHeaders.find (header => header.name === 'x-slack-response') | |
let slackSJON = slackResponse ? slackResponse.value : JSON.stringify ({ok: false}) | |
let url = URLParse(details.url) | |
chrome.tabs.update (details.tabId, { | |
url: chrome.extension.getURL ( | |
`redirect.html?state=${encodeURIComponent (url.query.state || '')}&slack=${encodeURIComponent (slackSJON)}` | |
), |
OlderNewer