Skip to content

Commit

Permalink
bugfix: buttions-position
Browse files Browse the repository at this point in the history
  • Loading branch information
riskers committed Jun 27, 2022
1 parent ca336f9 commit 8f2673c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
19 changes: 1 addition & 18 deletions src/content_script/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as ReactDOM from 'react-dom';
window.addEventListener('load', () => {
// REPO PAGE
const dom = document.createElement('div');
document.body.append(dom);
document.body.querySelector('.Layout-sidebar').prepend(dom);

ReactDOM.render(
<ThemeProvider theme={theme}>
Expand All @@ -17,21 +17,4 @@ window.addEventListener('load', () => {
</ThemeProvider>,
dom,
);

/* if (href === `https://github.com/${username}?tab=following`) {
const userDom = document.querySelectorAll('.d-table-cell.col-9.v-align-top.pr-3');
userDom.forEach((o) => {
const dom = document.createElement('span');
o.querySelector('.d-inline-block').appendChild(dom);
render(<Followers />, dom);
});
} */

// GIST page
// if (href.match(/^https:\/\/gist.github.com\/\w*/gi)) {
// const oDiv = document.createElement('div');
// render(<Gist />, oDiv);

// document.body.appendChild(oDiv);
// }
});
6 changes: 3 additions & 3 deletions src/content_script/pages/repo/buttons.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { IInterceptIntoPage } from '@/background/network';
import { ACTION_SHOW_OPTION_PAGE, IAction } from '@/content_script/hooks/oneway-message/message';
import { ACTION_SHOW_OPTION_PAGE, IAction, INTERCEPT_INTO_PAGE } from '@/content_script/hooks/oneway-message/message';
import { IStarModel } from '@/services/model/star';
import { Chip, Stack } from '@mui/material';
import { green } from '@mui/material/colors';
import { Box } from '@mui/system';
import React from 'react';

/**
* INJECT IN REPO PAGE
* INJECT IN REPO PAGE SHOW TAG AND GROUP
*/
const Buttons: React.FC<{}> = () => {
const [starInfo, setStarInfo] = React.useState<IStarModel>(null);

const openOptionPage = () => {
chrome.runtime.sendMessage({ type: ACTION_SHOW_OPTION_PAGE });
chrome.runtime.sendMessage({ type: INTERCEPT_INTO_PAGE });
};

React.useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manifest_version": 3,
"version": "1.0.0.0",
"version": "1.0.0.1",
"name": "GithubX",
"description": "__MSG_description__",
"default_locale": "en",
Expand Down
2 changes: 1 addition & 1 deletion src/options/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title>GithubX - Manage Your Stars and Gist</title>
<link href="https://cdn.jsdelivr.net/npm/@fontsource/[email protected]/index.min.css" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/normalize.css" />
<script async src="https://www.googletagmanager.com/gtag/js?id=G-W8J4DHFYPV"></script>
<!-- <script async src="https://www.googletagmanager.com/gtag/js?id=G-W8J4DHFYPV"></script> -->
</head>
<body>
<div id="app"></div>
Expand Down

0 comments on commit 8f2673c

Please sign in to comment.