OiWorld / MindTheWord

An extension for Google Chrome that helps people learn new languages while they browse the web.
43 stars 47 forks source link

Context menu features #119

Closed rohankatyal29 closed 8 years ago

rohankatyal29 commented 8 years ago

Search for similar words on:

Blacklist websites Blacklist words

screen shot 2016-05-27 at 4 58 55 pm
ankit-m commented 8 years ago

@rohankatyal29

  1. I would suggest renaming the file contextMenuFeaturesImplementation.js to contextMenu.js
  2. I believe you should create a class in your services file called ContextMenu and add the functions its methods. This will lead to a much cleaner design.
// in contextMenu.js (services folder)
export class ContextMenu {
  addUrlToBlacklist(args) { ... }
  getSynonyms(args) { ... }
}

// in eventPage.js
import { ContextMenu } from './services/contextMenu'

var contextMenu = new ContextMenu();
...
contextMenu.addUrlToBlacklist(arg);
ceilican commented 8 years ago

Thanks!