Skip to content

Commit

Permalink
fix linkedin html path changed
Browse files Browse the repository at this point in the history
  • Loading branch information
yafkari committed Oct 12, 2022
1 parent 8aaceef commit 5190625
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
32 changes: 16 additions & 16 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");
const TsConfigPathsPlugin = require("tsconfig-paths-webpack-plugin")
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const TsConfigPathsPlugin = require('tsconfig-paths-webpack-plugin')

module.exports = {
entry: {
index: "./src/index.tsx",
index: './src/index.tsx',
},
output: {
path: path.resolve(__dirname, "../dist"),
filename: "[name].bundle.js",
path: path.resolve(__dirname, '../dist'),
filename: '[name].bundle.js',
clean: true,
},
module: {
Expand All @@ -18,33 +18,33 @@ module.exports = {
{
test: /\.(js|jsx)$/,
use: {
loader: "babel-loader",
loader: 'babel-loader',
options: {
presets: ["@babel/preset-env", "@babel/preset-react"],
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
},
{
test: /\.s[ac]ss$/i,
use: [
"style-loader",
"css-loader",
"sass-loader",
'style-loader',
'css-loader',
'sass-loader',
]
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: "./src/index.html",
filename: "index.html",
template: './src/index.html',
filename: 'index.html',
}),
new CopyPlugin({
patterns: [{ from: "public" }],
patterns: [{ from: 'public' }],
}),
],
resolve: {
extensions: [".tsx", ".ts", ".jsx", ".js"],
extensions: ['.tsx', '.ts', '.jsx', '.js'],
enforceExtension: false,
fullySpecified: false,
plugins: [new TsConfigPathsPlugin()]
Expand Down
6 changes: 3 additions & 3 deletions public/content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ async function removePromotedPosts() {
var isEmpty = Object.keys(value).length === 0;

if (isEmpty || (!isEmpty && value[key] === true)) {
var nodes = document.getElementsByClassName('t-12 t-normal t-black--light job-card-container__footer-item');
var nodes = document.getElementsByClassName('job-card-container__footer-item inline-flex align-items-center');

Array.from(nodes).forEach(element => {
element.parentNode.parentNode.remove();
Array.from(nodes).filter(node => !node.classList.contains('job-card-container__apply-method')).forEach(element => {
element.parentNode.parentNode.parentNode.parentNode.remove();
})
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<title>Chrome extension React boilerplate</title>
</head>
<body>
<div id="root"></div>
<div id="root"></div>
</body>
</html>
</html>

0 comments on commit 5190625

Please sign in to comment.